Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public render() {
const { rootProps, ariaDescribedBy, ariaLabelledBy, className } = this.props
const divProps = getNativeProps(this.props, htmlElementProperties)
const Tag = this.props.elementType || 'div'
return (
export const CardView: ICardComponent['view'] = props => {
const Slots = getSlots(props, {
root: Stack
});
const { children, styles, tokens, horizontal, onClick, onKeyDown, ...rest } = props;
const nativeProps = getNativeProps>(rest, htmlElementProperties);
// Get childrenGap and childrenMargin token values.
const childrenGap = tokens && (tokens as ICardTokens).childrenGap;
const childrenMargin = tokens && (tokens as ICardTokens).childrenMargin;
const childrenCount = React.Children.count(children);
/* The map function below takes the Card children and applies the correct margin and gap tokens to them, ensuring at the same time that
* they are of type CardItem or CardSection. */
const cardChildren: (React.ReactChild | null)[] = React.Children.map(
children,
(child: React.ReactElement, index: number) => {
if (!child) {
return null;
}
// Ensure that we're dealing with CardItems and CardSections and throw a warning otherwise.
onGrowData = this._onGrowData
} = this.props;
const commandBarData: ICommandBarData = {
primaryItems: [...items],
overflowItems: [...overflowItems!],
minimumOverflowItems: [...overflowItems!].length, // for tracking
farItems,
cacheKey: ''
};
this._classNames = getClassNames(styles!, { theme: theme! });
// ResizeGroup will render these attributes to the root <div>.
// TODO We may need to elevate classNames from into ?
const nativeProps = getNativeProps>(this.props, divProperties);
return (
);
}
</div>
allFocusable,
calendarAs: CalendarType = Calendar,
tabIndex
} = this.props;
const { isDatePickerShown, formattedDate, selectedDate } = this.state;
const classNames = getClassNames(styles, {
theme: theme!,
className,
disabled,
label: !!label,
isDatePickerShown
});
const calloutId = getId('DatePicker-Callout');
const nativeProps = getNativeProps>(this.props, divProperties, ['value']);
const iconProps = textFieldProps && textFieldProps.iconProps;
return (
<div>
<div aria-owns="{isDatePickerShown" aria-haspopup="true">
</div></div>
private _onRenderRoot = (props: IExampleComponentProps): JSX.Element => {
const { className, href }: IExampleComponentProps = this.props;
if (!!href) {
const anchorProps: React.HTMLAttributes =
getNativeProps(this.props, anchorProperties);
return (
<a>
);
} else {
const buttonProps: React.HTMLAttributes =
getNativeProps(this.props, buttonProperties);
return (
</a>
const { className, href }: IExampleComponentProps = this.props;
if (!!href) {
const anchorProps: React.HTMLAttributes =
getNativeProps(this.props, anchorProperties);
return (
<a>
);
} else {
const buttonProps: React.HTMLAttributes =
getNativeProps(this.props, buttonProperties);
return (
<button>
);
}
}
</button></a>