Skip to content

Commit

Permalink
adding title prop to OuiIcon component, removing wrapping span elemen…
Browse files Browse the repository at this point in the history
…t in buttonIcon and updating snapshots

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
  • Loading branch information
BigSamu committed Jan 1, 2024
1 parent 144782c commit 787119a
Show file tree
Hide file tree
Showing 23 changed files with 665 additions and 1,052 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exports[`OuiSkipLink is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
>
Expand All @@ -30,7 +29,6 @@ exports[`OuiSkipLink props onClick is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -47,7 +45,6 @@ exports[`OuiSkipLink props position absolute is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -65,7 +62,6 @@ exports[`OuiSkipLink props position fixed is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -82,7 +78,6 @@ exports[`OuiSkipLink props position static is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -100,7 +95,6 @@ exports[`OuiSkipLink props tabIndex is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,21 +418,19 @@ exports[`OuiInMemoryTable behavior pagination 1`] = `
<span
className="ouiButtonContent ouiButtonContent--iconRight ouiButtonEmpty__content"
>
<span>
<OuiIcon
<OuiIcon
className="ouiButtonContent__icon"
color="inherit"
size="s"
type="arrowDown"
>
<span
className="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="arrowDown"
size="s"
type="arrowDown"
>
<span
className="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="arrowDown"
size="s"
/>
</OuiIcon>
</span>
/>
</OuiIcon>
<span
className="ouiButtonEmpty__text"
>
Expand Down Expand Up @@ -589,7 +587,6 @@ exports[`OuiInMemoryTable behavior pagination 1`] = `
<span
className="ouiButtonContent ouiButtonEmpty__content"
>
<span />
<span
className="ouiButtonEmpty__text"
>
Expand Down Expand Up @@ -673,7 +670,6 @@ exports[`OuiInMemoryTable behavior pagination 1`] = `
<span
className="ouiButtonContent ouiButtonEmpty__content"
>
<span />
<span
className="ouiButtonEmpty__text"
>
Expand Down
69 changes: 18 additions & 51 deletions src/components/button/__snapshots__/button.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ exports[`OuiButton is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
>
Expand All @@ -28,7 +27,6 @@ exports[`OuiButton props color accent is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -44,7 +42,6 @@ exports[`OuiButton props color danger is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -60,7 +57,6 @@ exports[`OuiButton props color ghost is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -76,7 +72,6 @@ exports[`OuiButton props color primary is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -92,7 +87,6 @@ exports[`OuiButton props color secondary is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -108,7 +102,6 @@ exports[`OuiButton props color success is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -124,7 +117,6 @@ exports[`OuiButton props color text is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -140,7 +132,6 @@ exports[`OuiButton props color warning is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -158,7 +149,6 @@ exports[`OuiButton props contentProps is rendered 1`] = `
class="ouiButtonContent ouiButton__content testClass1 testClass2"
data-test-subj="test subject string"
>
<span />
<span
class="ouiButton__text"
>
Expand All @@ -176,7 +166,6 @@ exports[`OuiButton props fill is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -192,7 +181,6 @@ exports[`OuiButton props fullWidth is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -210,7 +198,6 @@ exports[`OuiButton props href secures the rel attribute when the target is _blan
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -226,13 +213,11 @@ exports[`OuiButton props iconSide left is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span>
<span
class="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="user"
/>
</span>
<span
class="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="user"
/>
<span
class="ouiButton__text"
>
Expand All @@ -250,13 +235,11 @@ exports[`OuiButton props iconSide right is rendered 1`] = `
<span
class="ouiButtonContent ouiButtonContent--iconRight ouiButton__content"
>
<span>
<span
class="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="user"
/>
</span>
<span
class="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="user"
/>
<span
class="ouiButton__text"
>
Expand All @@ -274,13 +257,11 @@ exports[`OuiButton props iconType is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span>
<span
class="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="user"
/>
</span>
<span
class="ouiButtonContent__icon"
color="inherit"
data-ouiicon-type="user"
/>
<span
class="ouiButton__text"
/>
Expand All @@ -297,7 +278,6 @@ exports[`OuiButton props isDisabled is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -314,7 +294,6 @@ exports[`OuiButton props isDisabled renders a button even when href is defined 1
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -331,7 +310,6 @@ exports[`OuiButton props isDisabled renders if passed as disabled 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -348,11 +326,9 @@ exports[`OuiButton props isLoading is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span>
<span
class="ouiLoadingSpinner ouiLoadingSpinner--medium ouiButtonContent__spinner"
/>
</span>
<span
class="ouiLoadingSpinner ouiLoadingSpinner--medium ouiButtonContent__spinner"
/>
<span
class="ouiButton__text"
/>
Expand All @@ -369,7 +345,6 @@ exports[`OuiButton props isSelected is rendered as false 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -386,7 +361,6 @@ exports[`OuiButton props isSelected is rendered as true 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -403,7 +377,6 @@ exports[`OuiButton props minWidth is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -419,7 +392,6 @@ exports[`OuiButton props size m is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -435,7 +407,6 @@ exports[`OuiButton props size s is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span />
<span
class="ouiButton__text"
/>
Expand All @@ -451,10 +422,6 @@ exports[`OuiButton props textProps is rendered 1`] = `
<span
class="ouiButtonContent ouiButton__content"
>
<span
aria-label="aria-label"
data-test-subj="test subject string"
/>
<span
aria-label="aria-label"
class="ouiButton__text testClass1 testClass2"
Expand Down
Loading

0 comments on commit 787119a

Please sign in to comment.