Skip to content

Commit

Permalink
Update src/docs/tipsForReusableCode.mdx
Browse files Browse the repository at this point in the history
Co-authored-by: James Sheasby Thomas <[email protected]>
  • Loading branch information
kimon-satan and rightsaidjames authored Feb 28, 2024
1 parent 0cddeda commit 0621d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/docs/tipsForReusableCode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In all cases your component will be a function composed of other atoms, molecule
- make sure all of this is explicitly documented in the parent component

### Decomposition
- In the most complex cases you might want to decompose the existing component into smaller components which will then allow you to recompose them replacing only the parts you want to change.
- In the most complex cases you might want to decompose the existing component into smaller components. This will then allow you to recompose them, replacing only the parts you want to change.
- An example of this is `OakCheckBox` and `OakQuizCheckBox` which are ccomposed of `InternalCheckBox`,`InternalCheckBoxLabel` and `InternalCheckBoxWrapper` . This allows the `OakQuizCheckBox` to have a different layout and behaviour to the `OakCheckBox` but with the same underlying functionality.
- This is probably the most robust method but the most labour intensive as it involves refactoring the existing component.
- Some risks to look out for are:
Expand Down

0 comments on commit 0621d19

Please sign in to comment.