Skip to content

Commit

Permalink
fix(core/desk): use StudioUI tooltip and remove paddings
Browse files Browse the repository at this point in the history
  • Loading branch information
ninaandal committed Oct 19, 2023
1 parent 6a7b8bc commit bc47672
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Button, ButtonProps, TooltipProps} from '@sanity/ui'
import {Button, ButtonProps} from '@sanity/ui'
import React, {forwardRef} from 'react'
import {TooltipProps} from '../../../ui'

/** @internal */
export interface CommonProps extends Omit<ButtonProps, 'text' | 'iconRight'> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {hues} from '@sanity/color'
import {ErrorOutlineIcon} from '@sanity/icons'
import {Flex, Text, Theme, Tooltip} from '@sanity/ui'
import {Flex, Text, Theme} from '@sanity/ui'
import {format, isValid, parse} from 'date-fns'
import React, {
ChangeEvent,
Expand All @@ -13,6 +13,7 @@ import React, {
} from 'react'
import styled, {css} from 'styled-components'
import {CustomTextInput} from '../../../../common/CustomTextInput'
import {Tooltip} from '../../../../../../../../../../ui'
import {getDateISOString} from './utils/getDateISOString'

interface ParsedDateTextInputProps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {Badge, BadgeTone, Box, Inline, Text, Tooltip} from '@sanity/ui'
import {Badge, BadgeTone, Inline, Text} from '@sanity/ui'
import React from 'react'
import {RenderBadgeCollectionState} from '../../../../components'
import {useDocumentPane} from '../../useDocumentPane'
import {Tooltip} from '../../../../../ui'
import {DocumentBadgeDescription} from 'sanity'

interface DocumentBadgesInnerProps {
Expand All @@ -20,13 +21,7 @@ function DocumentBadgesInner({states}: DocumentBadgesInnerProps) {
<Inline space={1}>
{states.map((badge, index) => (
<Tooltip
content={
badge.title && (
<Box padding={2}>
<Text size={1}>{badge.title}</Text>
</Box>
)
}
content={badge.title && <Text size={1}>{badge.title}</Text>}
disabled={!badge.title}
key={String(index)}
placement="top"
Expand Down

0 comments on commit bc47672

Please sign in to comment.