Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do Not Merge] DS-567: Remove Remaining bolt-button bolt-link #2450

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
236 changes: 0 additions & 236 deletions packages/analytics/autolink/__tests__/autolink.test.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/components/bolt-carousel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Under the hood, the `<bolt-carousel>` component uses the excellent <a href="http
yarn add @bolt/components-carousel
```

<h2 class="c-bds-docs__heading-fragment c-bolt-headline c-bolt-headline--bold c-bolt-headline--xxlarge c-bolt-headline--link" id="usage"><bolt-link url="#usage" is-headline>Usage</bolt-link></h2>
<h2 class="c-bds-docs__heading-fragment c-bolt-headline c-bolt-headline--bold c-bolt-headline--xxlarge c-bolt-headline--link" id="usage"><a href="#usage">Usage</a></h2>
<details open>
<summary><strong>Via Web Component</strong></summary>
<section>
Expand Down
46 changes: 27 additions & 19 deletions packages/components/bolt-form/src/inputs/form-button.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,32 @@
*/
#}

{% set attributes = create_attribute(attributes | default({})) %}

{% set classes = [
"c-bolt-button",
"c-bolt-button--center",
"c-bolt-button--medium",
"c-bolt-button--primary",
width is not empty ? "c-bolt-button--" ~ width : "",
] %}

<button {{ attributes.addClass(classes) }}>
{% if icon %}
<span class="c-bolt-button__icon">
{% include "@bolt-elements-icon/icon.twig" with icon only %}
</span>
{% set _button_attributes = attributes|default({}) %}

{% set _button_attributes = _button_attributes|merge({ type: 'button' }) %}

{% set _button_props = {
content: text,
attributes: _button_attributes,
} %}

{% if width is not empty %}
{% if width == 'full' %}
{% set _display = 'block' %}
{% elseif width == 'full@small' %}
{% set _display = 'inline@from-small' %}
{% endif %}

<span class="c-bolt-button__item">
{{ text }}
</span>
</button>
{% set _button_props = _button_props|merge({ display: _display }) %}
{% endif %}


{% if icon %}
{% set _icon_rendered %}
{% include '@bolt-elements-icon/icon.twig' with icon only %}
{% endset %}

{% set _button_props = _button_props|merge({ icon_before: _icon_rendered }) %}
{% endif %}

{% include '@bolt-elements-button/button.twig' with _button_props only %}
47 changes: 27 additions & 20 deletions packages/components/bolt-search-filter/search-filter.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@
<bolt-{{ componentName }} bolt-component>
<div {{ attributes.addClass(classes) }}>
<div class="{{ "#{baseClass}__trigger" }}">
{% include "@bolt-components-button/button.twig" with {
"text": "Close search filter"|t,
"url": "#" ~ panelId,
"size": "xsmall",
"style": "primary",
"border_radius": "full",
"iconOnly": true,
"icon": {
"name": "more",
"size": "medium"
{% set _more_icon %}
{% include '@bolt-components-icon/icon.twig' with {
name: 'more',
size: 'medium'
} only %}
{% endset %}
{% include '@bolt-elements-button/button.twig' with {
content: 'Close search filter'|t,
border_radius: 'full',
size: 'xsmall',
icon_only: _more_icon,
attributes: {
href: "#" ~ panelId,
}
} only %}
</div>
Expand Down Expand Up @@ -67,16 +70,20 @@
</div>

<div class="{{ "#{baseClass}__panel-controls #{baseClass}__panel-controls--close" }}">
{% include "@bolt-components-button/button.twig" with {
"text": "Close search filter"|t,
"url": "#!",
"size": "xsmall",
"style": "text",
"border_radius": "full",
"iconOnly": true,
"icon": {
"name": "close",
"size": "medium"
{% set _close_icon %}
{% include '@bolt-components-icon/icon.twig' with {
name: 'more',
size: 'medium'
} only %}
{% endset %}
{% include '@bolt-elements-button/button.twig' with {
content: 'Close search filter'|t,
border_radius: 'full',
size: 'xsmall',
hierarchy: 'transparent',
icon_only: _close_icon,
attributes: {
href: "#!",
}
} only %}
</div>
Expand Down
20 changes: 13 additions & 7 deletions packages/components/bolt-tooltip/src/tooltip.twig
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,20 @@
{{ trigger.text }}
{% endif %}
{% elseif trigger.type == "button" %}
{% include "@bolt-components-button/button.twig" with {
text: trigger.text,
icon: {
name: trigger.icon.name,
{% set trigger_icon %}
{% include "@bolt-components-icon/icon.twig" with {
name:trigger.icon.name,
size: trigger.icon.size,
position: "before",
},
style: "secondary",
} only %}
{% endset %}

{% include '@bolt-elements-button/button.twig' with {
content: trigger.text,
hierarchy: 'secondary',
icon_before: trigger_icon,
attributes: {
type: 'button'
}
} only %}
{# End adapter for old trigger data #}

Expand Down
Loading