UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

99 lines 3.06 kB
import { getFocusStyle, hiddenContentStyle, HighContrastSelector, } from '../../Styling'; export function getStyles(props) { var disabled = props.disabled, theme = props.theme; var semanticColors = theme.semanticColors, palette = theme.palette; var ratingSmallIconSize = '16px'; var ratingLargeIconSize = '20px'; return { ratingStar: [ 'ms-RatingStar-container', { display: 'inline-block', position: 'relative' } ], ratingStarBack: [ 'ms-RatingStar-back', { // TODO: Use a proper semantic color for this color: palette.neutralTertiary, width: '100%' }, disabled && { color: semanticColors.disabledBodyText, selectors: (_a = {}, _a[HighContrastSelector] = { color: 'GrayText' }, _a) } ], ratingStarFront: [ 'ms-RatingStar-front', { position: 'absolute', height: '100 %', left: '0', top: '0', textAlign: 'center', verticalAlign: 'middle', overflow: 'hidden', color: semanticColors.bodyTextChecked, selectors: (_b = {}, _b[HighContrastSelector] = { 'color': 'Highlight' }, _b) } ], ratingButton: [ getFocusStyle(theme, 0), 'ms-Rating-button', { background: 'none', margin: '3px 3px 0px 0px', padding: '0px', border: 'none', cursor: 'pointer', selectors: { '&:disabled': { cursor: 'default' }, '&[disabled]': { cursor: 'default' } } }, disabled && { cursor: 'default' }, ], rootIsSmall: [ 'ms-Rating--small', { fontSize: ratingSmallIconSize, lineHeight: ratingSmallIconSize } ], rootIsLarge: [ 'ms-Rating--large', { fontSize: ratingLargeIconSize, lineHeight: ratingLargeIconSize } ], labelText: [ 'ms-Rating-labelText', hiddenContentStyle ], ratingFocusZone: [ 'ms-Rating-focuszone', { display: 'inline-block', paddingBottom: '1px' } ] }; var _a, _b; } //# sourceMappingURL=Rating.styles.js.map