import React, {forwardRef} from 'react' import {RevertIcon} from '@sanity/icons' import {Button, ButtonProps} from '@sanity/ui' import styled from 'styled-components' const RevertButton = styled.button` [data-ui='Text'] { font-weight: normal; } div[data-ui='Box'] { display: none; } &:not([data-disabled='true']):hover, &:not([data-disabled='true']):focus { --card-fg-color: ${({theme}) => theme.sanity.color.solid.critical.enabled.bg}; --card-bg-color: transparent; --card-border-color: transparent; div[data-ui='Box'] { display: block; } } ` export const RevertChangesButton = forwardRef( (props: ButtonProps & React.HTMLProps, ref): React.ReactElement => { const {selected, ...restProps} = props return (