Shared:Components: fix bugs
This commit is contained in:
parent
d184bc4bb8
commit
8ac55a51c2
@ -1,19 +0,0 @@
|
||||
import styled, { css } from "styled-components";
|
||||
import {
|
||||
Container,
|
||||
// @ts-expect-error TS(2305): Module '"../../calendar/styled-components"' has no... Remove this comment to see the full error message
|
||||
CurrentDateItem,
|
||||
HeaderActionIcon,
|
||||
} from "../../calendar/styled-components";
|
||||
|
||||
const getDefaultStyles = ({
|
||||
$currentColorScheme
|
||||
}: any) =>
|
||||
$currentColorScheme &&
|
||||
css`
|
||||
${HeaderActionIcon} {
|
||||
border-color: ${$currentColorScheme.main.accent};
|
||||
}
|
||||
`;
|
||||
|
||||
export default styled(Container)(getDefaultStyles);
|
@ -1,36 +0,0 @@
|
||||
import styled, { css } from "styled-components";
|
||||
import { DateItem } from "../../calendar/styled-components";
|
||||
|
||||
const getDefaultStyles = ({
|
||||
$currentColorScheme
|
||||
}: any) =>
|
||||
$currentColorScheme &&
|
||||
css`
|
||||
${(props) =>
|
||||
// @ts-expect-error TS(2339): Property 'isCurrent' does not exist on type 'Theme... Remove this comment to see the full error message
|
||||
props.isCurrent &&
|
||||
css`
|
||||
background: ${$currentColorScheme.main.accent};
|
||||
:hover {
|
||||
background-color: ${$currentColorScheme.main.accent};
|
||||
}
|
||||
|
||||
:focus {
|
||||
background-color: ${$currentColorScheme.main.accent};
|
||||
}
|
||||
`}
|
||||
color: ${(props) =>
|
||||
// @ts-expect-error TS(2339): Property 'disabled' does not exist on type 'Themed... Remove this comment to see the full error message
|
||||
props.disabled
|
||||
? props.theme.calendar.disabledColor
|
||||
// @ts-expect-error TS(2339): Property 'focused' does not exist on type 'ThemedS... Remove this comment to see the full error message
|
||||
: props.focused
|
||||
? $currentColorScheme.main.accent
|
||||
: props.theme.calendar.color};
|
||||
border-color: ${(props) =>
|
||||
// @ts-expect-error TS(2339): Property 'focused' does not exist on type 'ThemedS... Remove this comment to see the full error message
|
||||
props.focused ? $currentColorScheme.main.accent : "transparent"};
|
||||
`;
|
||||
|
||||
|
||||
export default styled(DateItem)(getDefaultStyles);
|
@ -1,25 +0,0 @@
|
||||
import styled, { css } from "styled-components";
|
||||
import { RoundButton } from "../../calendar/styled-components";
|
||||
|
||||
const getDefaultStyles = ({
|
||||
$currentColorScheme
|
||||
}: any) =>
|
||||
$currentColorScheme &&
|
||||
css`
|
||||
:hover {
|
||||
outline: ${(props) =>
|
||||
// @ts-expect-error TS(2339): Property 'disabled' does not exist on type 'ThemeP... Remove this comment to see the full error message
|
||||
props.disabled
|
||||
? `1px solid ${props.theme.calendar.outlineColor}`
|
||||
: `2px solid ${$currentColorScheme.main.accent}`};
|
||||
span {
|
||||
border-color: ${(props) =>
|
||||
// @ts-expect-error TS(2339): Property 'disabled' does not exist on type 'ThemeP... Remove this comment to see the full error message
|
||||
props.disabled
|
||||
? props.theme.calendar.disabledArrow
|
||||
: $currentColorScheme.main.accent};
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default styled(RoundButton)(getDefaultStyles);
|
@ -47,7 +47,7 @@ export const AccessRightSelectPure = ({
|
||||
className="access-right-item"
|
||||
key={item.key}
|
||||
data-key={item.key}
|
||||
// onClick={onSelectCurrentItem}
|
||||
onClick={() => onSelectCurrentItem(item)}
|
||||
>
|
||||
<StyledItem>
|
||||
{item.icon && <StyledItemIcon src={item.icon} />}
|
||||
@ -70,12 +70,14 @@ export const AccessRightSelectPure = ({
|
||||
);
|
||||
});
|
||||
|
||||
return { items };
|
||||
return items;
|
||||
};
|
||||
|
||||
const formattedOptions =
|
||||
advancedOptions || formatToAccessRightItem(accessOptions);
|
||||
|
||||
// console.log(formattedOptions);
|
||||
|
||||
return (
|
||||
<StyledWrapper
|
||||
className={className}
|
||||
|
Loading…
Reference in New Issue
Block a user