mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
styled-components ts conflict
This commit is contained in:
parent
6d19a5ac32
commit
fab399659f
1 changed files with 15 additions and 7 deletions
|
@ -58,11 +58,18 @@ const TopBarContainer = styled.div`
|
|||
justify-content: space-between;
|
||||
`;
|
||||
|
||||
const Accordion = styled(EuiAccordion)`
|
||||
border: ${theme.euiBorderThick};
|
||||
border-radius: ${theme.euiSizeS};
|
||||
margin-bottom: ${theme.euiSize};
|
||||
`;
|
||||
// @types/styled-components@3.0.1 does not yet support `defaultProps`, which EuiAccordion uses
|
||||
// Ref: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31903
|
||||
// const Accordion = styled(EuiAccordion)`
|
||||
// border: ${theme.euiBorderThick};
|
||||
// border-radius: ${theme.euiSizeS};
|
||||
// margin-bottom: ${theme.euiSize};
|
||||
// `;
|
||||
const accordionStyles = {
|
||||
border: theme.euiBorderThick,
|
||||
borderRadius: theme.euiSizeS,
|
||||
marginBottom: theme.euiSize,
|
||||
};
|
||||
|
||||
const Icon = styled(EuiIcon)`
|
||||
margin-right: ${theme.euiSizeS};
|
||||
|
@ -103,7 +110,8 @@ const onClick = (e: MouseEvent<HTMLDivElement>) => {
|
|||
};
|
||||
|
||||
const Difference = (props: { fileDiff: FileDiff; repoUri: string; revision: string }) => (
|
||||
<Accordion
|
||||
<EuiAccordion
|
||||
style={accordionStyles}
|
||||
initialIsOpen={true}
|
||||
id={props.fileDiff.path}
|
||||
buttonContent={
|
||||
|
@ -135,7 +143,7 @@ const Difference = (props: { fileDiff: FileDiff; repoUri: string; revision: stri
|
|||
language={props.fileDiff.language!}
|
||||
renderSideBySide={true}
|
||||
/>
|
||||
</Accordion>
|
||||
</EuiAccordion>
|
||||
);
|
||||
|
||||
export class DiffPage extends React.Component<Props> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue