Skip to content

Commit c9768b1

Browse files
committed
docs: remove inline code comments from prop type documentation
INSTUI-5129
1 parent b99dd57 commit c9768b1

6 files changed

Lines changed: 28 additions & 19 deletions

File tree

packages/ui-avatar/src/Avatar/v1/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type AvatarOwnProps = {
5959
| 'x-large'
6060
| 'xx-large'
6161
color?:
62-
| 'default' // = brand
62+
| 'default'
6363
| 'shamrock'
6464
| 'barney'
6565
| 'crimson'

packages/ui-date-input/src/DateInput2/v1/props.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ type DateInput2OwnProps = {
3939
calendarIcon: string
4040
prevMonthButton: string
4141
nextMonthButton: string
42-
// TODO: Make this field required in the next version. Currently optional to avoid breaking change.
4342
datePickerDialog?: string
4443
selectedLabel?: string
4544
}

packages/ui-range-input/src/RangeInput/v1/props.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ import type {
2929
RangeInputTheme,
3030
PickPropsWithExceptions
3131
} from '@instructure/shared-types'
32-
import type { FormFieldOwnProps, FormMessage } from '@instructure/ui-form-field/v11_6'
32+
import type {
33+
FormFieldOwnProps,
34+
FormMessage
35+
} from '@instructure/ui-form-field/v11_6'
3336
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
3437
import type { InputHTMLAttributes } from 'react'
3538
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
@@ -89,9 +92,7 @@ type RangeInputOwnProps = {
8992
* The "deprecated" variant has an outer shadow on focus.
9093
* The "accessible" variant has better color contrast, border and inset focus ring for better accessibility.
9194
*/
92-
thumbVariant?:
93-
| 'deprecated' // TODO: deprecated, remove in V9.
94-
| 'accessible'
95+
thumbVariant?: 'deprecated' | 'accessible'
9596

9697
/**
9798
* A function that provides a reference to the actual underlying input element

packages/ui-text/src/Text/v2/props.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ type TextOwnProps = {
3636
*/
3737
as?: AsElementType
3838
/**
39-
* Color of the text
39+
* Color of the text.
40+
*
41+
* `primary-on` and `secondary-on` are meant for use on colored surfaces
42+
* (like `warning`) and keep the same color in dark and light themes.
4043
*/
4144
color?:
4245
| 'inherit'
@@ -48,8 +51,8 @@ type TextOwnProps = {
4851
| 'warning'
4952
| 'primary-inverse'
5053
| 'secondary-inverse'
51-
| 'primary-on' // used on colored surfaces like warning, same color in dark and light themes
52-
| 'secondary-on' // used on colored surfaces like warning, same color in dark and light themes
54+
| 'primary-on'
55+
| 'secondary-on'
5356
| 'ai-highlight'
5457
/**
5558
* Provides a reference to the underlying HTML element

packages/ui-view/src/View/v1/props.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ type ViewOwnProps = {
6262
/**
6363
* By default the display prop is 'auto', meaning it takes on the
6464
* display rules of the html element it's rendered as (see `as` prop).
65+
*
66+
* `inherit`, `initial`, `revert`, `revert-layer` and `unset` are the global
67+
* CSS values (see the
68+
* [MDN `display` reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/display)).
6569
*/
6670
display?:
6771
| 'auto'
@@ -71,12 +75,11 @@ type ViewOwnProps = {
7175
| 'flex'
7276
| 'inline-flex'
7377
| 'contents'
74-
// these are global CSS values
75-
| 'inherit' // inherit the parent's display value
76-
| 'initial' // reset the property back to the spec default
77-
| 'revert' // reset to user agent stylesheet
78+
| 'inherit'
79+
| 'initial'
80+
| 'revert'
7881
| 'revert-layer'
79-
| 'unset' // same as initial
82+
| 'unset'
8083
overflowX?: 'auto' | 'hidden' | 'visible'
8184
overflowY?: 'auto' | 'hidden' | 'visible'
8285
height?: string | number

packages/ui-view/src/View/v2/props.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ type ViewOwnProps = {
7878
/**
7979
* By default the display prop is 'auto', meaning it takes on the
8080
* display rules of the html element it's rendered as (see `as` prop).
81+
*
82+
* `inherit`, `initial`, `revert`, `revert-layer` and `unset` are the global
83+
* CSS values (see the
84+
* [MDN `display` reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/display)).
8185
*/
8286
display?:
8387
| 'auto'
@@ -87,12 +91,11 @@ type ViewOwnProps = {
8791
| 'flex'
8892
| 'inline-flex'
8993
| 'contents'
90-
// these are global CSS values
91-
| 'inherit' // inherit the parent's display value
92-
| 'initial' // reset the property back to the spec default
93-
| 'revert' // reset to user agent stylesheet
94+
| 'inherit'
95+
| 'initial'
96+
| 'revert'
9497
| 'revert-layer'
95-
| 'unset' // same as initial
98+
| 'unset'
9699
overflowX?: 'auto' | 'hidden' | 'visible'
97100
overflowY?: 'auto' | 'hidden' | 'visible'
98101
height?: string | number

0 commit comments

Comments
 (0)