Last active
October 30, 2021 23:06
-
-
Save n8rzz/b22ea2c6d51b46d9fa5eba0521206928 to your computer and use it in GitHub Desktop.
ui-experiment-props.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum ExperimentName { | |
a = 'a', | |
b = 'b', | |
} | |
export type Experiment = { | |
[key in ExperimentName]: React.ReactNode; | |
}; | |
interface IProps extends Experiment { | |
/** | |
* Used to identify which component variant is active and should be rendered. | |
* | |
* When `true`, node passed via `b` is always rendered. | |
*/ | |
isExperimentActive: boolean; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment