Skip to content

Commit 0445912

Browse files
committed
docs: more theming docs
1 parent 9e5cf8d commit 0445912

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

docs/guides/using-theme-overrides.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ order: 2
99
This document gives an overview on how you can customize Instructure UI components by tweaking their theme variables.
1010
While this gives you a level of flexibility on the look and feel of the components you should be aware of 2 things:
1111

12-
- The default theme variables are tested to have high enough contrast ratios for WCAG 2.1 conformance. If you are making changes, please make sure that your app stays WCAG conformant.
12+
- The default theme variables are tested to have high enough contrast ratios for WCAG 2.1 AA conformance. If you are making changes, please make sure that your app stays WCAG conformant.
1313
- The look of components is only customisable to a certain degree. This is intentional, because Instructure UI is a design system geared towards the Canvas "look and feel", not a generic UI component library.
1414

1515
```js
@@ -199,9 +199,27 @@ type: example
199199
<div>
200200
<Button color='primary'
201201
themeOverride={{ primaryBackground: "purple" }}
202-
margin="small 0 0">
202+
margin="small 0 large">
203203
Purple Primary Button
204204
</Button>
205+
<InstUISettingsProvider
206+
theme={{
207+
componentOverrides: {
208+
TextInput: { background: "yellow" }
209+
}
210+
}}
211+
>
212+
<DateInput2
213+
renderLabel="This is how to handle override in a nested component"
214+
screenReaderLabels={{
215+
calendarIcon: 'Calendar',
216+
nextMonthButton: 'Next month',
217+
prevMonthButton: 'Previous month'
218+
}}
219+
width="20rem"
220+
invalidDateErrorMessage="Invalid date"
221+
/>
222+
</InstUISettingsProvider>
205223
</div>
206224
</div>
207225
```

0 commit comments

Comments
 (0)