Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/@buffetjs/core/src/components/Picker/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import Text from '../Text';
import colors from '../../theme/colors';
const PickerButton = styled(props => (
<Text
as="button"
fontWeight="semiBold"
color={props.isActive ? 'mediumBlue' : 'greyDark'}
{...props}
/>
))`
display: flex;
align-items: center;
height: 30px;
padding: 0 10px;
background-color: ${({ theme }) => theme.main.colors.white};
border: 1px solid ${({ theme }) => theme.main.colors.darkGrey};
border-radius: ${({ theme }) => theme.main.sizes.borderRadius};
&:active,
&:focus {
outline: 0;
}
> svg + span,
> span + svg {
margin-left: 10px;
}
> svg g {
stroke: ${({ theme }) => theme.main.colors.greyDark};
}
${({ isActive, theme }) =>
isActive
? `
background-color: ${theme.main.colors.lightBlue};
border: 1px solid ${theme.main.colors.darkBlue};
color: ${theme.main.colors.mediumBlue};
> svg g {
stroke: ${theme.main.colors.mediumBlue};
}
`
: `
&:hover {
background-color: ${theme.main.colors.lightestGrey};
}
`}
`;
PickerButton.defaultProps = {
isActive: false,
type: 'button',
// TODO : This is temporary
theme: {
main: {
colors,
sizes: {
borderRadius: '2px',
fonts: {
xs: '11px',
sm: '12px',
md: '13px',
lg: '18px',
},
},
fontWeights: {
regular: 400,
semiBold: 500,
bold: 600,
black: 900,
},
},
},
};
PickerButton.propTypes = {
isActive: PropTypes.bool,
type: PropTypes.string,
};
export default PickerButton;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]-- |