@@ -30,7 +30,6 @@ import {
3030 ProjectIcon ,
3131} from '@primer/octicons-react'
3232import { KeybindingHint } from '../KeybindingHint'
33- import { FeatureFlags } from '../FeatureFlags'
3433import classes from './ActionList.features.stories.module.css'
3534
3635export default {
@@ -393,17 +392,15 @@ export const WithDynamicContent = () => {
393392 const [ isTrue , setIsTrue ] = React . useState ( false )
394393
395394 return (
396- < FeatureFlags flags = { { primer_react_action_list_item_as_button : true } } >
397- < ActionList >
398- < ActionList . Item
399- onSelect = { ( ) => {
400- setIsTrue ( ! isTrue )
401- } }
402- >
403- Activated? { isTrue ? 'Yes' : 'No' }
404- </ ActionList . Item >
405- </ ActionList >
406- </ FeatureFlags >
395+ < ActionList >
396+ < ActionList . Item
397+ onSelect = { ( ) => {
398+ setIsTrue ( ! isTrue )
399+ } }
400+ >
401+ Activated? { isTrue ? 'Yes' : 'No' }
402+ </ ActionList . Item >
403+ </ ActionList >
407404 )
408405}
409406
@@ -922,87 +919,83 @@ export const WithTrailingAction = () => {
922919 } , [ ] )
923920
924921 return (
925- < FeatureFlags flags = { { primer_react_action_list_item_as_button : true } } >
926- < ActionList >
927- < ActionList . Item >
928- < ActionList . LeadingVisual >
929- < FileDirectoryIcon />
930- </ ActionList . LeadingVisual >
931- Item 1 (with default TrailingAction)
932- < ActionList . TrailingAction label = "Expand sidebar" icon = { ArrowLeftIcon } />
933- </ ActionList . Item >
934- < ActionList . Item >
935- Item 2 (with link TrailingAction)
936- < ActionList . TrailingAction as = "a" href = "#" label = "Some action 1" icon = { ArrowRightIcon } />
937- </ ActionList . Item >
938- < ActionList . Item >
939- Item 3< ActionList . Description > This is an inline description.</ ActionList . Description >
940- < ActionList . TrailingAction label = "Some action 2" icon = { BookIcon } />
941- </ ActionList . Item >
942- < ActionList . Item >
943- Item 4< ActionList . Description variant = "block" > This is a block description.</ ActionList . Description >
944- < ActionList . TrailingAction label = "Some action 3" icon = { BookIcon } />
945- </ ActionList . Item >
946- < ActionList . Item >
947- Item 5< ActionList . Description variant = "block" > This is a block description.</ ActionList . Description >
948- < ActionList . TrailingAction label = "Some action 4" />
949- </ ActionList . Item >
950- < ActionList . Item >
951- Item 6
952- < ActionList . TrailingAction href = "#" as = "a" label = "Some action 5" />
953- </ ActionList . Item >
954- < ActionList . Item >
955- Icon button loading state
956- < ActionList . Description >
957- Shows how IconButton maintains width and centers spinner when loading
958- </ ActionList . Description >
959- < ActionList . TrailingAction label = "Process item" icon = { ArrowRightIcon } loading />
960- </ ActionList . Item >
961- < ActionList . Item >
962- Icon button with transitions
963- < ActionList . Description >
964- Automatically toggles loading state every 2.5 seconds to show transitions
965- </ ActionList . Description >
966- < ActionList . TrailingAction label = "Toggle loading" icon = { ArrowRightIcon } loading = { loadingState } />
967- </ ActionList . Item >
968- < ActionList . Item >
969- Text button loading state
970- < ActionList . Description >
971- Shows how text button aligns spinner to the right and preserves width
972- </ ActionList . Description >
973- < ActionList . TrailingAction label = "Save changes" loading />
974- </ ActionList . Item >
975- < ActionList . Item >
976- Text button with transitions
977- < ActionList . Description >
978- Automatically toggles loading state every 2.5 seconds to show transitions
979- </ ActionList . Description >
980- < ActionList . TrailingAction label = "Apply settings" loading = { loadingState } />
981- </ ActionList . Item >
982- < ActionList . LinkItem href = "#" >
983- LinkItem 1
984- < ActionList . Description >
985- with TrailingAction this is a long description and should not cause horizontal scroll on smaller screen
986- sizes
987- </ ActionList . Description >
988- < ActionList . TrailingAction label = "Another action" />
989- </ ActionList . LinkItem >
990- < ActionList . LinkItem href = "#" >
991- LinkItem 2
992- < ActionList . Description >
993- with TrailingVisual this is a long description and should not cause horizontal scroll on smaller screen
994- sizes
995- </ ActionList . Description >
996- < ActionList . TrailingVisual >
997- < TableIcon />
998- </ ActionList . TrailingVisual >
999- </ ActionList . LinkItem >
1000- < ActionList . Item inactiveText = "Unavailable due to an outage" >
1001- Inactive Item< ActionList . Description > With TrailingAction</ ActionList . Description >
1002- < ActionList . TrailingAction as = "a" href = "#" label = "Some action 8" icon = { ArrowRightIcon } />
1003- </ ActionList . Item >
1004- </ ActionList >
1005- </ FeatureFlags >
922+ < ActionList >
923+ < ActionList . Item >
924+ < ActionList . LeadingVisual >
925+ < FileDirectoryIcon />
926+ </ ActionList . LeadingVisual >
927+ Item 1 (with default TrailingAction)
928+ < ActionList . TrailingAction label = "Expand sidebar" icon = { ArrowLeftIcon } />
929+ </ ActionList . Item >
930+ < ActionList . Item >
931+ Item 2 (with link TrailingAction)
932+ < ActionList . TrailingAction as = "a" href = "#" label = "Some action 1" icon = { ArrowRightIcon } />
933+ </ ActionList . Item >
934+ < ActionList . Item >
935+ Item 3< ActionList . Description > This is an inline description.</ ActionList . Description >
936+ < ActionList . TrailingAction label = "Some action 2" icon = { BookIcon } />
937+ </ ActionList . Item >
938+ < ActionList . Item >
939+ Item 4< ActionList . Description variant = "block" > This is a block description.</ ActionList . Description >
940+ < ActionList . TrailingAction label = "Some action 3" icon = { BookIcon } />
941+ </ ActionList . Item >
942+ < ActionList . Item >
943+ Item 5< ActionList . Description variant = "block" > This is a block description.</ ActionList . Description >
944+ < ActionList . TrailingAction label = "Some action 4" />
945+ </ ActionList . Item >
946+ < ActionList . Item >
947+ Item 6
948+ < ActionList . TrailingAction href = "#" as = "a" label = "Some action 5" />
949+ </ ActionList . Item >
950+ < ActionList . Item >
951+ Icon button loading state
952+ < ActionList . Description >
953+ Shows how IconButton maintains width and centers spinner when loading
954+ </ ActionList . Description >
955+ < ActionList . TrailingAction label = "Process item" icon = { ArrowRightIcon } loading />
956+ </ ActionList . Item >
957+ < ActionList . Item >
958+ Icon button with transitions
959+ < ActionList . Description >
960+ Automatically toggles loading state every 2.5 seconds to show transitions
961+ </ ActionList . Description >
962+ < ActionList . TrailingAction label = "Toggle loading" icon = { ArrowRightIcon } loading = { loadingState } />
963+ </ ActionList . Item >
964+ < ActionList . Item >
965+ Text button loading state
966+ < ActionList . Description >
967+ Shows how text button aligns spinner to the right and preserves width
968+ </ ActionList . Description >
969+ < ActionList . TrailingAction label = "Save changes" loading />
970+ </ ActionList . Item >
971+ < ActionList . Item >
972+ Text button with transitions
973+ < ActionList . Description >
974+ Automatically toggles loading state every 2.5 seconds to show transitions
975+ </ ActionList . Description >
976+ < ActionList . TrailingAction label = "Apply settings" loading = { loadingState } />
977+ </ ActionList . Item >
978+ < ActionList . LinkItem href = "#" >
979+ LinkItem 1
980+ < ActionList . Description >
981+ with TrailingAction this is a long description and should not cause horizontal scroll on smaller screen sizes
982+ </ ActionList . Description >
983+ < ActionList . TrailingAction label = "Another action" />
984+ </ ActionList . LinkItem >
985+ < ActionList . LinkItem href = "#" >
986+ LinkItem 2
987+ < ActionList . Description >
988+ with TrailingVisual this is a long description and should not cause horizontal scroll on smaller screen sizes
989+ </ ActionList . Description >
990+ < ActionList . TrailingVisual >
991+ < TableIcon />
992+ </ ActionList . TrailingVisual >
993+ </ ActionList . LinkItem >
994+ < ActionList . Item inactiveText = "Unavailable due to an outage" >
995+ Inactive Item< ActionList . Description > With TrailingAction</ ActionList . Description >
996+ < ActionList . TrailingAction as = "a" href = "#" label = "Some action 8" icon = { ArrowRightIcon } />
997+ </ ActionList . Item >
998+ </ ActionList >
1006999 )
10071000}
10081001
0 commit comments