mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 00:26:34 +03:00
fix: make callbacks expandable by keyboard (#1354)
This commit is contained in:
parent
0ab06cfd84
commit
46eee7b70c
|
@ -32,7 +32,10 @@ export class CallbackTitle extends React.PureComponent<CallbackTitleProps> {
|
|||
}
|
||||
}
|
||||
|
||||
const CallbackTitleWrapper = styled.div`
|
||||
const CallbackTitleWrapper = styled.button`
|
||||
border: 0;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
& > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
@ -45,7 +48,7 @@ const CallbackTitleWrapper = styled.div`
|
|||
`;
|
||||
|
||||
const CallbackName = styled.span<{ deprecated?: boolean }>`
|
||||
text-decoration: ${props => (props.deprecated ? 'line-through' : 'none')};
|
||||
text-decoration: ${(props) => (props.deprecated ? 'line-through' : 'none')};
|
||||
margin-right: 8px;
|
||||
`;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import styled from '../../styled-components';
|
||||
import { CallbackTitle } from './CallbackTitle';
|
||||
import { darken } from 'polished';
|
||||
|
||||
export const StyledCallbackTitle = styled(CallbackTitle)`
|
||||
padding: 10px;
|
||||
|
@ -8,6 +9,7 @@ export const StyledCallbackTitle = styled(CallbackTitle)`
|
|||
line-height: 1.5em;
|
||||
background-color: ${({ theme }) => theme.colors.gray[100]};
|
||||
cursor: pointer;
|
||||
outline-color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.colors.gray[100])};
|
||||
`;
|
||||
|
||||
export const CallbackDetailsWrap = styled.div`
|
||||
|
|
Loading…
Reference in New Issue
Block a user