import React from 'react';
import markdown from './README.mdx';
import Unit from '.';
import Table from '../Table';
import Text from '../Text';
export default {
  title: 'Components/Content Related/Unit',
  component: Unit,
  parameters: {
    componentSubtitle: 'Component',
    status: 'released',
    mdx: markdown
  }
};
export var Regular = function Regular(args) {
  return /*#__PURE__*/React.createElement(Unit, args);
};
Regular.args = {
  children: '12345',
  type: 'usd'
};
var description = "\nYou can customize the content by using `BannerNavigation`.\n";
Regular.story = {
  parameters: {
    docs: {
      storyDescription: description
    }
  }
};
export var NumberFractionDigits = function NumberFractionDigits() {
  return /*#__PURE__*/React.createElement(Table, null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "Input value"), /*#__PURE__*/React.createElement("td", null, "minimumFractionDigits"), /*#__PURE__*/React.createElement("td", null, "maximumFractionDigits"), /*#__PURE__*/React.createElement("td", null, "Result"), /*#__PURE__*/React.createElement("td", null, "Comment"))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "0.1234567"), /*#__PURE__*/React.createElement("td", null, "3"), /*#__PURE__*/React.createElement("td", null, "3"), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Unit, {
    type: "Num",
    minimumFractionDigits: 3,
    maximumFractionDigits: 3
  }, 0.1234567)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Text, {
    kind: "caption"
  }, "uses minimumFractionDigits and maximumFractionDigits"))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "0.1234567"), /*#__PURE__*/React.createElement("td", null, "0"), /*#__PURE__*/React.createElement("td", null, "0"), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Unit, {
    type: "Num",
    minimumFractionDigits: 0,
    maximumFractionDigits: 0
  }, 0.1234567)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Text, {
    kind: "caption"
  }, "detects value smaller than 1 and adopts minimumFractionDigits to avoid displaying 0"))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "12345.1234567"), /*#__PURE__*/React.createElement("td", null, "0"), /*#__PURE__*/React.createElement("td", null, "0"), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Unit, {
    type: "Num",
    minimumFractionDigits: 0,
    maximumFractionDigits: 0
  }, 12345.1234567)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Text, {
    kind: "caption"
  }, "detects value larger than 1 uses minimumFractionDigits and maximumFractionDigits")))));
};
NumberFractionDigits.story = {
  parameters: {
    docs: {
      storyDescription: "You can customize the number of decimal places by changing the `minimumFractionDigits` and `maximumFractionDigits` prop. If `value < 1` is getting displayed the `minimumFractionDigits` will automatically adopt to display the significant decimal places."
    }
  }
};