File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed
Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ export const FeatureCard = ({
645645 < StarRating
646646 rating = { starRating }
647647 size = { starRatingSize }
648- useDarkTheme = { true }
648+ useAltTheme = { true }
649649 />
650650 ) : (
651651 < div css = { starRatingWrapper } >
Original file line number Diff line number Diff line change 11import type { Meta , StoryObj } from '@storybook/react-webpack5' ;
2-
32import { type Props , StarRating } from './StarRating' ;
43
54const meta = {
@@ -61,9 +60,9 @@ export const StarsWithLargePadding: Story = {
6160 } ,
6261} ;
6362
64- export const StarsWithDarkTheme : Story = {
63+ export const StarsWithAlternativeTheme : Story = {
6564 args : {
6665 size : 'large' ,
67- useDarkTheme : true ,
66+ useAltTheme : true ,
6867 } ,
6968} ;
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ const emptyStarColor = css`
2323 background-color : ${ palette ( '--star-rating-empty-background' ) } ;
2424` ;
2525
26- const emptyStarDarkColor = css `
27- background-color : ${ palette ( '--star-rating-empty-dark -background' ) } ;
26+ const emptyStarAltColor = css `
27+ background-color : ${ palette ( '--star-rating-empty-alt -background' ) } ;
2828` ;
2929
3030const determineSize = ( size : RatingSizeType ) => {
@@ -108,15 +108,15 @@ export type Props = {
108108 rating : Rating ;
109109 size : RatingSizeType ;
110110 paddingSize ?: PaddingSizeType ;
111- /** The dark theme is to account for star ratings that appear on lighter / translucent backgrounds (eg feature cards). The dark theme ensures we meet AA accessibility standard */
112- useDarkTheme ?: boolean ;
111+ /** The alternative theme is to account for star ratings that appear on lighter / translucent backgrounds (e.g. feature cards). The alternative theme ensures we meet AA accessibility standards */
112+ useAltTheme ?: boolean ;
113113} ;
114114
115115export const StarRating = ( {
116116 rating,
117117 size,
118118 paddingSize = 'small' ,
119- useDarkTheme = false ,
119+ useAltTheme = false ,
120120} : Props ) => (
121121 < div
122122 css = { [ determineSize ( size ) , determinePaddingTop ( paddingSize ) , container ] }
@@ -131,7 +131,7 @@ export const StarRating = ({
131131 key = { i }
132132 css = { [
133133 starBackground ,
134- useDarkTheme ? emptyStarDarkColor : emptyStarColor ,
134+ useAltTheme ? emptyStarAltColor : emptyStarColor ,
135135 ] }
136136 >
137137 < SvgStarOutline />
Original file line number Diff line number Diff line change @@ -7967,7 +7967,7 @@ const paletteColours = {
79677967 light : starRatingEmptyBackgroundColourLight ,
79687968 dark : starRatingEmptyBackgroundColourDark ,
79697969 } ,
7970- '--star-rating-empty-dark -background' : {
7970+ '--star-rating-empty-alt -background' : {
79717971 light : starRatingEmptyBackgroundColourDark ,
79727972 dark : starRatingEmptyBackgroundColourDark ,
79737973 } ,
You can’t perform that action at this time.
0 commit comments