@@ -985,6 +985,7 @@ function PlaygroundSection({ tier: tierProp }: { tier: Tier }) {
985985 const [ message , setMessage ] = useState ( 'This is an informational alert message.' )
986986 const [ copyStatus , setCopyStatus ] = useState ( '' )
987987 const [ dismissed , setDismissed ] = useState ( false )
988+ const [ motion , setMotion ] = useState < 0 | 1 | 2 | 3 > ( 3 )
988989
989990 const reactCode = useMemo (
990991 ( ) => generateReactCode ( tier , variant , message , dismissible , showIcon , showTitle , title , showAction ) ,
@@ -1078,6 +1079,7 @@ function PlaygroundSection({ tier: tierProp }: { tier: Tier }) {
10781079 onDismiss = { ( ) => setDismissed ( true ) }
10791080 icon = { showIcon ? undefined : null as unknown as undefined }
10801081 action = { showAction ? { label : 'Learn more' , onClick : ( ) => { } } : undefined }
1082+ motion = { motion }
10811083 style = { { inlineSize : '100%' , position : 'relative' , zIndex : 1 } }
10821084 >
10831085 { message }
@@ -1127,6 +1129,15 @@ function PlaygroundSection({ tier: tierProp }: { tier: Tier }) {
11271129 < div className = "alert-page__playground-controls" >
11281130 < OptionGroup label = "Variant" options = { VARIANTS } value = { variant } onChange = { setVariant } />
11291131
1132+ { tier !== 'lite' && (
1133+ < OptionGroup
1134+ label = "Motion"
1135+ options = { [ '0' , '1' , '2' , '3' ] as const }
1136+ value = { String ( motion ) as '0' | '1' | '2' | '3' }
1137+ onChange = { v => setMotion ( Number ( v ) as 0 | 1 | 2 | 3 ) }
1138+ />
1139+ ) }
1140+
11301141 < div className = "alert-page__control-group" >
11311142 < span className = "alert-page__control-label" > Toggles</ span >
11321143 < div style = { { display : 'flex' , flexDirection : 'column' , gap : '0.375rem' } } >
@@ -1658,7 +1669,7 @@ export default function AlertPage() {
16581669 </ p >
16591670 < div style = { { display : 'flex' , flexDirection : 'column' , gap : '0.75rem' } } >
16601671 < a
1661- href = "https://github.com/annondeveloper/ui-kit/blob/v2 /src/components/alert.tsx"
1672+ href = "https://github.com/annondeveloper/ui-kit/blob/main /src/components/alert.tsx"
16621673 target = "_blank"
16631674 rel = "noopener noreferrer"
16641675 className = "alert-page__source-link"
@@ -1667,7 +1678,7 @@ export default function AlertPage() {
16671678 src/components/alert.tsx (Standard)
16681679 </ a >
16691680 < a
1670- href = "https://github.com/annondeveloper/ui-kit/blob/v2 /src/lite/alert.tsx"
1681+ href = "https://github.com/annondeveloper/ui-kit/blob/main /src/lite/alert.tsx"
16711682 target = "_blank"
16721683 rel = "noopener noreferrer"
16731684 className = "alert-page__source-link"
@@ -1676,7 +1687,7 @@ export default function AlertPage() {
16761687 src/lite/alert.tsx (Lite)
16771688 </ a >
16781689 < a
1679- href = "https://github.com/annondeveloper/ui-kit/blob/v2 /src/premium/alert.tsx"
1690+ href = "https://github.com/annondeveloper/ui-kit/blob/main /src/premium/alert.tsx"
16801691 target = "_blank"
16811692 rel = "noopener noreferrer"
16821693 className = "alert-page__source-link"
0 commit comments