diff --git a/src/design-system/atoms/branding/DynamicBranding.tsx b/src/design-system/atoms/branding/DynamicBranding.tsx index 82a9d4c..d69fec7 100644 --- a/src/design-system/atoms/branding/DynamicBranding.tsx +++ b/src/design-system/atoms/branding/DynamicBranding.tsx @@ -2,9 +2,10 @@ import * as React from 'react'; import ReactTooltip from 'react-tooltip'; import { palette } from '../colors'; import { SparkleOverlay } from '../sparkle'; -import { Logomark, LogoProps, Logotype } from './Branding'; +import { Logomark, Logotype } from './Branding'; +import { LogoFlagProps, LogomarkFlag, LogotypeFlag } from './FlagBranding'; -type DynamicLogoProps = Partial & { +type DynamicLogoProps = LogoFlagProps & { currentDate?: Date; }; @@ -99,6 +100,7 @@ const matchDay = ( type Variant = { activeIf: (currentDate?: Date) => boolean; sharedProps?: Partial; + flagStripes?: string[]; tooltip?: string; Logomark: React.FunctionComponent; Logotype: React.FunctionComponent; @@ -111,12 +113,17 @@ export const Trans: Variant = { matchDay(new Date('2021-Nov-13'), new Date('2021-Nov-22'), currentDate), sharedProps: { circleFill: '#F7A8B8', - circleOuterFill: '#55CDFC', + circleOuterFill: palette.taupe200, typeFill: palette.grey600, + stripes: ['#55CDFC', '#F7A8B8', palette.grey600, '#F7A8B8', '#55CDFC'], }, tooltip: 'Roleypoly says trans rights!', - Logomark: (props: DynamicLogoProps) => , - Logotype: (props: DynamicLogoProps) => , + Logomark: (props: DynamicLogoProps) => ( + + ), + Logotype: (props: DynamicLogoProps) => ( + + ), }; export const Bi: Variant = { @@ -125,12 +132,17 @@ export const Bi: Variant = { matchDay(new Date('2021-Sep-16'), new Date('2021-Sep-24'), currentDate), sharedProps: { circleFill: '#D60270', - circleOuterFill: '#0038A8', + circleOuterFill: palette.taupe200, typeFill: '#9B4F96', + stripes: ['#0038A8', '#0038A8', '#9B4F96', '#D60270', '#D60270'], }, tooltip: 'Being bi is a lot like a riding a bicycle since they can go both ways.', - Logomark: (props: DynamicLogoProps) => , - Logotype: (props: DynamicLogoProps) => , + Logomark: (props: DynamicLogoProps) => ( + + ), + Logotype: (props: DynamicLogoProps) => ( + + ), }; export const Lesbian: Variant = { @@ -139,15 +151,16 @@ export const Lesbian: Variant = { matchDay(new Date('2021-Apr-25'), new Date('2021-Apt-27'), currentDate), sharedProps: { circleFill: '#D362A4', - circleOuterFill: '#A30262', + circleOuterFill: palette.taupe200, typeFill: '#FF9A56', + stripes: ['#D52D00', '#FF9A56', palette.grey600, '#D362A4', '#A30262'], }, tooltip: "I'm a lesbiab... lesbiam... Less Bien... Girls.", Logomark: (props: DynamicLogoProps) => ( - + ), Logotype: (props: DynamicLogoProps) => ( - + ), }; @@ -157,12 +170,17 @@ export const Ace: Variant = { matchDay(new Date('2021-Oct-24'), new Date('2021-Oct-31'), currentDate), sharedProps: { circleFill: '#333', - circleOuterFill: '#84067C', + circleOuterFill: palette.taupe200, typeFill: '#CCC', + stripes: ['#84067C', palette.grey600, '#CCCCCC', palette.grey100], }, tooltip: "Sexualn't", - Logomark: (props: DynamicLogoProps) => , - Logotype: (props: DynamicLogoProps) => , + Logomark: (props: DynamicLogoProps) => ( + + ), + Logotype: (props: DynamicLogoProps) => ( + + ), }; export const Birthday: Variant = { @@ -281,16 +299,29 @@ export const Christmas: Variant = { circleFill: palette.green200, circleOuterFill: palette.red200, typeFill: palette.green400, + stripes: [ + palette.grey600, + palette.red400, + palette.grey600, + palette.red400, + palette.grey600, + palette.red400, + palette.grey600, + palette.red400, + palette.grey600, + palette.red400, + palette.grey600, + ], }, tooltip: 'Have yourself a merry little Christmas~', Logomark: (props: DynamicLogoProps) => ( - + ), Logotype: (props: DynamicLogoProps) => ( - + ), }; @@ -349,297 +380,22 @@ export const Pride: Variant = { sharedProps: { circleOuterFill: palette.taupe200, typeFill: palette.grey500, + stripes: [ + '#593BB5', + '#26B186', + '#FFC468', + '#F97C21', + '#F62C8B', + '#8B5950', + '#2D3234', + ], }, tooltip: 'LOVE WINS. 💖🌈🌟', Logomark: (props: DynamicLogoProps) => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - + ), Logotype: (props: DynamicLogoProps) => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ), }; diff --git a/src/design-system/atoms/branding/FlagBranding.stories.tsx b/src/design-system/atoms/branding/FlagBranding.stories.tsx new file mode 100644 index 0000000..478dbb5 --- /dev/null +++ b/src/design-system/atoms/branding/FlagBranding.stories.tsx @@ -0,0 +1,13 @@ +import { LogoFlagProps, LogomarkFlag, LogotypeFlag } from './FlagBranding'; + +export default { + title: 'Atoms/Branding/Flags', + component: LogomarkFlag, + args: { + stripes: ['#F9238B', '#FB7B04', '#FFCA66', '#00B289', '#5A38B5', '#B413F5'], + height: 50, + }, +}; + +export const logomarkFlag = (args: LogoFlagProps) => ; +export const logotypeFlag = (args: LogoFlagProps) => ; diff --git a/src/design-system/atoms/branding/FlagBranding.tsx b/src/design-system/atoms/branding/FlagBranding.tsx new file mode 100644 index 0000000..8d1e0c6 --- /dev/null +++ b/src/design-system/atoms/branding/FlagBranding.tsx @@ -0,0 +1,192 @@ +import * as React from 'react'; +import { palette } from '../colors'; +import { LogoProps } from './Branding'; + +export type LogoFlagProps = LogoProps & { + stripes: string[]; +}; + +export const generateStripes = (stripes: string[]) => { + const barWidth = 100 / stripes.length; + return ( + + {stripes.map((stripeFill, idx) => ( + + ))} + + ); +}; + +export const LogomarkFlag = (props: LogoFlagProps) => ( + + + + + + + + + + + + {generateStripes(props.stripes)} + + + + + + + + + + +); + +export const LogotypeFlag = (props: LogoFlagProps) => ( + + + + + + + + + + + + + + + + + + + + + + + {generateStripes(props.stripes)} + + + + + + + + + + +);