File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
packages/ui/src/components/Alert Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ exports[`alert > renders correctly small 1`] = `
1616 style = " --_4k0ekn3: 1 1 auto;"
1717 >
1818 <svg
19- class = " styles__vbm0wq0 styles_prominence_default__vbm0wqg styles_disabled_false__vbm0wqf styles_sentiment_danger__vbm0wq5 styles_size_large__vbm0wq8 styles_undefined_compound_36__vbm0wq1k"
20- viewBox = " 0 0 20 20 "
19+ class = " styles__1b838gxd styles__vbm0wq0 styles_prominence_default__vbm0wqg styles_disabled_false__vbm0wqf styles_sentiment_danger__vbm0wq5 styles_size_small__vbm0wqa styles_undefined_compound_36__vbm0wq1k"
20+ viewBox = " 0 0 16 16 "
2121 >
2222 <path
2323 clip-rule = " evenodd"
24- d = " M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM10 5C10.4142 5 10 .75 5 .33579 10 .75 5.75V10.25C10 .75 10.6642 10.4142 11 10 11C9. 58579 11 9 .25 10.6642 9 .25 10.25V5.75C9 .25 5 .33579 9 .58579 5 10 5ZM10 15C10.5523 15 11 14 .5523 11 14C11 13 .4477 10.5523 13 10 13C9.44771 13 9 13 .4477 9 14C9 14 .5523 9.44771 15 10 15Z "
24+ d = " M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM8 4C8.41421 4 8 .75 4 .33579 8 .75 4.75V7.75C8 .75 8.16421 8.41421 8.5 8 8.5C7. 58579 8.5 7 .25 8.16421 7 .25 7.75V4.75C7 .25 4 .33579 7 .58579 4 8 4ZM8 12C8.55228 12 9 11 .5523 9 11C9 10 .4477 8.55228 10 8 10C7.44772 10 7 10 .4477 7 11C7 11 .5523 7.44772 12 8 12Z "
2525 fill-rule = " evenodd"
2626 />
2727 </svg >
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
1616 alert ,
1717 buttonAlert ,
1818 buttonCloseAlert ,
19+ smallIcon ,
1920 textAlert ,
2021 wrapAlert ,
2122} from './styles.css'
@@ -98,9 +99,10 @@ export const Alert = ({
9899 >
99100 < Icon
100101 aria-hidden = "true"
102+ className = { size === 'small' ? smallIcon : '' }
101103 prominence = { sentiment === 'neutral' ? 'strong' : undefined }
102104 sentiment = { sentiment }
103- size = " large"
105+ size = { size === 'small' ? 'small' : ' large' }
104106 />
105107 < Stack
106108 alignItems = "center"
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ export const wrapAlert = style({
5050
5151export const textAlert = style ( {
5252 color : theme . colors . neutral . text ,
53- paddingTop : theme . space [ '0.25' ] ,
5453} )
5554
5655export const buttonAlert = styleVariants ( {
@@ -67,3 +66,7 @@ export const buttonCloseAlert = style({
6766} )
6867
6968export type AlertVariants = NonNullable < RecipeVariants < typeof alert > >
69+
70+ export const smallIcon = style ( {
71+ marginTop : theme . space [ '0.25' ] ,
72+ } )
You can’t perform that action at this time.
0 commit comments