diff --git a/packages/react/src/components/Button/__snapshots__/index.story.storyshot b/packages/react/src/components/Button/__snapshots__/index.story.storyshot index 43114e1fb..ca8f1a6d5 100644 --- a/packages/react/src/components/Button/__snapshots__/index.story.storyshot +++ b/packages/react/src/components/Button/__snapshots__/index.story.storyshot @@ -2,6 +2,7 @@ exports[`Storyshots Button Danger 1`] = ` .c0 { + cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; @@ -20,7 +21,11 @@ exports[`Storyshots Button Danger 1`] = ` margin: 0; overflow: visible; text-transform: none; - cursor: pointer; +} + +.c0:disabled, +.c0[aria-disabled]:not([aria-disabled=false]) { + cursor: default; } .c0:focus { @@ -32,11 +37,6 @@ exports[`Storyshots Button Danger 1`] = ` padding: 0; } -.c0:disabled, -.c0[aria-disabled]:not([aria-disabled=false]) { - cursor: default; -} - .c1 { width: -webkit-min-content; width: -moz-min-content; @@ -130,6 +130,7 @@ exports[`Storyshots Button Danger 1`] = ` exports[`Storyshots Button Default 1`] = ` .c0 { + cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; @@ -148,7 +149,11 @@ exports[`Storyshots Button Default 1`] = ` margin: 0; overflow: visible; text-transform: none; - cursor: pointer; +} + +.c0:disabled, +.c0[aria-disabled]:not([aria-disabled=false]) { + cursor: default; } .c0:focus { @@ -160,11 +165,6 @@ exports[`Storyshots Button Default 1`] = ` padding: 0; } -.c0:disabled, -.c0[aria-disabled]:not([aria-disabled=false]) { - cursor: default; -} - .c1 { width: -webkit-min-content; width: -moz-min-content; @@ -258,6 +258,7 @@ exports[`Storyshots Button Default 1`] = ` exports[`Storyshots Button Disabled 1`] = ` .c0 { + cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; @@ -276,7 +277,11 @@ exports[`Storyshots Button Disabled 1`] = ` margin: 0; overflow: visible; text-transform: none; - cursor: pointer; +} + +.c0:disabled, +.c0[aria-disabled]:not([aria-disabled=false]) { + cursor: default; } .c0:focus { @@ -288,11 +293,6 @@ exports[`Storyshots Button Disabled 1`] = ` padding: 0; } -.c0:disabled, -.c0[aria-disabled]:not([aria-disabled=false]) { - cursor: default; -} - .c1 { width: -webkit-min-content; width: -moz-min-content; @@ -386,6 +386,7 @@ exports[`Storyshots Button Disabled 1`] = ` exports[`Storyshots Button Fixed 1`] = ` .c0 { + cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; @@ -404,7 +405,11 @@ exports[`Storyshots Button Fixed 1`] = ` margin: 0; overflow: visible; text-transform: none; - cursor: pointer; +} + +.c0:disabled, +.c0[aria-disabled]:not([aria-disabled=false]) { + cursor: default; } .c0:focus { @@ -416,11 +421,6 @@ exports[`Storyshots Button Fixed 1`] = ` padding: 0; } -.c0:disabled, -.c0[aria-disabled]:not([aria-disabled=false]) { - cursor: default; -} - .c1 { width: -webkit-fill-available; width: -moz-available; @@ -514,6 +514,7 @@ exports[`Storyshots Button Fixed 1`] = ` exports[`Storyshots Button Focus 1`] = ` .c0 { + cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; @@ -532,7 +533,11 @@ exports[`Storyshots Button Focus 1`] = ` margin: 0; overflow: visible; text-transform: none; - cursor: pointer; +} + +.c0:disabled, +.c0[aria-disabled]:not([aria-disabled=false]) { + cursor: default; } .c0:focus { @@ -544,11 +549,6 @@ exports[`Storyshots Button Focus 1`] = ` padding: 0; } -.c0:disabled, -.c0[aria-disabled]:not([aria-disabled=false]) { - cursor: default; -} - .c1 { width: -webkit-min-content; width: -moz-min-content; @@ -642,6 +642,7 @@ exports[`Storyshots Button Focus 1`] = ` exports[`Storyshots Button Layout Example 1`] = ` .c0 { + cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; @@ -660,7 +661,11 @@ exports[`Storyshots Button Layout Example 1`] = ` margin: 0; overflow: visible; text-transform: none; - cursor: pointer; +} + +.c0:disabled, +.c0[aria-disabled]:not([aria-disabled=false]) { + cursor: default; } .c0:focus { @@ -672,11 +677,6 @@ exports[`Storyshots Button Layout Example 1`] = ` padding: 0; } -.c0:disabled, -.c0[aria-disabled]:not([aria-disabled=false]) { - cursor: default; -} - .c1 { width: -webkit-min-content; width: -moz-min-content; @@ -1204,16 +1204,25 @@ exports[`Storyshots Button Layout Example 1`] = ` exports[`Storyshots Button Link 1`] = ` .c0 { - color: inherit; cursor: pointer; -} - -.c0:focus { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: transparent; + padding: 0; + border-style: none; outline: none; -} - -.c0 .text { - top: calc(1em + 2em); + color: inherit; + text-rendering: inherit; + -webkit-letter-spacing: inherit; + -moz-letter-spacing: inherit; + -ms-letter-spacing: inherit; + letter-spacing: inherit; + word-spacing: inherit; + font: inherit; + margin: 0; + overflow: visible; + text-transform: none; } .c0:disabled, @@ -1221,6 +1230,15 @@ exports[`Storyshots Button Link 1`] = ` cursor: default; } +.c0:focus { + outline: none; +} + +.c0::-moz-focus-inner { + border-style: none; + padding: 0; +} + .c1 { width: -webkit-min-content; width: -moz-min-content; @@ -1303,7 +1321,6 @@ exports[`Storyshots Button Link 1`] = ` data-dark={false} > @@ -51,16 +51,25 @@ exports[`Storyshots Clickable Button 1`] = ` exports[`Storyshots Clickable Link 1`] = ` .c0 { - color: inherit; cursor: pointer; -} - -.c0:focus { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: transparent; + padding: 0; + border-style: none; outline: none; -} - -.c0 .text { - top: calc(1em + 2em); + color: inherit; + text-rendering: inherit; + -webkit-letter-spacing: inherit; + -moz-letter-spacing: inherit; + -ms-letter-spacing: inherit; + letter-spacing: inherit; + word-spacing: inherit; + font: inherit; + margin: 0; + overflow: visible; + text-transform: none; } .c0:disabled, @@ -68,11 +77,19 @@ exports[`Storyshots Clickable Link 1`] = ` cursor: default; } +.c0:focus { + outline: none; +} + +.c0::-moz-focus-inner { + border-style: none; + padding: 0; +} +
( function Clickable(props, ref) { const { Link } = useComponentAbstraction() - if ('to' in props) { - const { onClick, disabled = false, ...rest } = props - return ( - - {...rest} - as={disabled ? undefined : Link} - onClick={disabled ? undefined : onClick} - aria-disabled={disabled} - ref={ref} - /> - ) - } else { - return