Skip to content

Commit

Permalink
Move Text component feature flag from primer_react_css_modules_staff …
Browse files Browse the repository at this point in the history
…to primer_react_css_modules_ga (#5020)

* Move Text to GA CSS modules feature flag

* Create long-pans-travel.md
  • Loading branch information
jonrohan authored Sep 25, 2024
1 parent 3302440 commit 31f03fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/long-pans-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move Text component feature flag from primer_react_css_modules_staff to primer_react_css_modules_ga
8 changes: 4 additions & 4 deletions e2e/components/Text.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_staff: true,
primer_react_css_modules_ga: true,
},
},
})
Expand All @@ -60,7 +60,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_staff: false,
primer_react_css_modules_ga: false,
},
},
})
Expand All @@ -74,7 +74,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_staff: true,
primer_react_css_modules_ga: true,
},
},
})
Expand All @@ -86,7 +86,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_staff: false,
primer_react_css_modules_ga: false,
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const StyledText = styled.span<StyledTextProps>`
`

const Text = forwardRef(({as: Component = 'span', className, size, weight, ...props}, forwardedRef) => {
const enabled = useFeatureFlag('primer_react_css_modules_staff')
const enabled = useFeatureFlag('primer_react_css_modules_ga')

const innerRef = React.useRef<HTMLElement>(null)
useRefObjectAsForwardedRef(forwardedRef, innerRef)
Expand Down

0 comments on commit 31f03fb

Please sign in to comment.