Skip to content

Commit

Permalink
feat(studio): move note in ConfigIssuesButton to the dialog header
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner authored and bjoerge committed Aug 15, 2022
1 parent ab1cdef commit 8338152
Showing 1 changed file with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {useCallback, useState} from 'react'
import {Box, Button, Dialog, Heading, Inline, Stack, Text, Tooltip} from '@sanity/ui'

import {InfoOutlineIcon, WarningOutlineIcon} from '@sanity/icons'
import {Box, Button, Dialog, Heading, Stack, Text, Tooltip} from '@sanity/ui'
import {WarningOutlineIcon} from '@sanity/icons'
import {useId} from '@reach/auto-id'
import {useSchema} from '../../../../hooks'
import {SchemaProblemGroups} from '../../../screens/schemaErrors/SchemaProblemGroups'
Expand Down Expand Up @@ -61,7 +60,15 @@ export function ConfigIssuesButton() {

{isDialogOpen && (
<Dialog
header="Configuration issues"
header={
<Stack space={3}>
<Text weight="semibold">Configuration issues</Text>
<Text muted size={1}>
Configuration checks are only performed during development and will not be visible
in production builds
</Text>
</Stack>
}
width={2}
onClickOutside={handleClose}
onClose={handleClose}
Expand All @@ -70,16 +77,6 @@ export function ConfigIssuesButton() {
id={dialogId}
>
<Stack space={4} padding={4}>
<Inline space={2} paddingY={3}>
<Text muted size={1}>
<InfoOutlineIcon />
</Text>
<Text muted size={1}>
Note: Configuration checks are only performed during development and will not be
visible in production builds
</Text>
</Inline>

<Heading as="h2" size={1}>
Found {groupsWithWarnings.length} schema warnings
</Heading>
Expand Down

0 comments on commit 8338152

Please sign in to comment.