UNPKG

@zohodesk/dot

Version:

In this Library, we Provide Some Basic Components to Build Your Application

34 lines 1.1 kB
import React from 'react'; import { defaultProps } from "./props/defaultProps"; import { propTypes } from "./props/propTypes"; import style from "../../../../setup/header/Views/Views.module.css"; import { Icon } from '@zohodesk/icons'; export default function Views(props) { let { isGrid, isList, gridTitle, listTitle, onListClick, onGridClick } = props; return /*#__PURE__*/React.createElement("span", { className: style.container }, /*#__PURE__*/React.createElement("span", { className: `${style.icon} ${style.first} ${isList ? style.active : ''}`, "data-title": !isList ? listTitle : null, onClick: onListClick }, /*#__PURE__*/React.createElement(Icon, { name: "ZD-list22", size: "10" })), /*#__PURE__*/React.createElement("span", { className: `${style.icon} ${style.last} ${isGrid ? style.active : ''}`, "data-title": !isGrid ? gridTitle : null, onClick: onGridClick }, /*#__PURE__*/React.createElement(Icon, { name: "ZD-grid", size: "11" }))); } Views.propTypes = propTypes; Views.defaultProps = defaultProps;