Skip to content

Commit

Permalink
chore: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack committed May 30, 2023
1 parent 2e51795 commit 32bfbba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contributor-docs/adrs/adr-010-behavior-isolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Primer React's [recent addition of the Relative Time component](https://github.c

```typescript
const root = (typeof globalThis !== 'undefined' ? globalThis : window) as typeof window
const HTMLElement = root.HTMLElement || (null as unknown as typeof window['HTMLElement'])
const HTMLElement = root.HTMLElement || (null as unknown as (typeof window)['HTMLElement'])
```

These lines could also be added to the global context, to avoid adding it to each element.
Expand Down
4 changes: 2 additions & 2 deletions src/ActionList/ActionList.features.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export const InsideOverlay = () => {
export const GroupWithSubtleTitle = () => {
const [assignees, setAssignees] = React.useState(users.slice(0, 1))

const toggleAssignee = (assignee: typeof users[number]) => {
const toggleAssignee = (assignee: (typeof users)[number]) => {
const assigneeIndex = assignees.findIndex(a => a.login === assignee.login)

if (assigneeIndex === -1) setAssignees([...assignees, assignee])
Expand Down Expand Up @@ -450,7 +450,7 @@ export const GroupWithSubtleTitle = () => {
export const GroupWithFilledTitle = () => {
const [assignees, setAssignees] = React.useState(users.slice(0, 1))

const toggleAssignee = (assignee: typeof users[number]) => {
const toggleAssignee = (assignee: (typeof users)[number]) => {
const assigneeIndex = assignees.findIndex(a => a.login === assignee.login)

if (assigneeIndex === -1) setAssignees([...assignees, assignee])
Expand Down
4 changes: 2 additions & 2 deletions src/ActionMenu/ActionMenu.examples.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const GroupsAndDescriptions = () => {
{name: 'FY23 - Q2', due: 'December 30, 2022', progress: 0},
]

const [selectedMilestone, setSelectedMilestone] = React.useState<typeof milestones[0] | undefined>()
const [selectedMilestone, setSelectedMilestone] = React.useState<(typeof milestones)[0] | undefined>()

return (
<ActionMenu open>
Expand Down Expand Up @@ -241,7 +241,7 @@ export const MixedSelection = () => {
export const MultipleSections = () => {
const items = [{name: 'Show code folding buttons'}, {name: 'Wrap lines'}, {name: 'Center content'}]

const [selectedMilestone, setSelectedMilestone] = React.useState<typeof items[0] | undefined>()
const [selectedMilestone, setSelectedMilestone] = React.useState<(typeof items)[0] | undefined>()

return (
<ActionMenu open>
Expand Down

0 comments on commit 32bfbba

Please sign in to comment.