github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/ui/dashboard/src/components/IntegerDisplay/index.stories.js (about)

     1  import IntegerDisplay from "./index";
     2  
     3  const story = {
     4    title: "Utilities/Integer Display",
     5    component: IntegerDisplay,
     6  };
     7  
     8  export default story;
     9  
    10  const lessThan1k = {
    11    num: 796,
    12  };
    13  const moreThan1k = {
    14    num: 2134,
    15  };
    16  const moreThan10k = {
    17    num: 21340,
    18  };
    19  const moreThan100k = {
    20    num: 156467,
    21  };
    22  const moreThan1M = {
    23    num: 2000999,
    24  };
    25  const moreThan10M = {
    26    num: 21340000,
    27  };
    28  const moreThan1000M = {
    29    num: 2134000000,
    30  };
    31  const negativeNumber = {
    32    num: -123,
    33  };
    34  const numberString = {
    35    num: "9876",
    36  };
    37  const numberNull = {
    38    num: null,
    39  };
    40  const numberUndefined = {
    41    num: undefined,
    42  };
    43  
    44  export const LessThan1k = () => <IntegerDisplay {...lessThan1k} />;
    45  export const MoreThan1k = () => <IntegerDisplay {...moreThan1k} />;
    46  export const MoreThan10k = () => <IntegerDisplay {...moreThan10k} />;
    47  export const MoreThan100k = () => <IntegerDisplay {...moreThan100k} />;
    48  export const MoreThan1M = () => <IntegerDisplay {...moreThan1M} />;
    49  export const MoreThan10M = () => <IntegerDisplay {...moreThan10M} />;
    50  export const MoreThan1000M = () => <IntegerDisplay {...moreThan1000M} />;
    51  export const NegativeNumber = () => <IntegerDisplay {...negativeNumber} />;
    52  export const NumberAsString = () => <IntegerDisplay {...numberString} />;
    53  export const NumberNull = () => <IntegerDisplay {...numberNull} />;
    54  export const NumberUndefined = () => <IntegerDisplay {...numberUndefined} />;
    55  
    56  export const LevelKAndLessThan1k = () => (
    57    <IntegerDisplay {...lessThan1k} startAt="k" />
    58  );
    59  export const LevelKAndMoreThan1k = () => (
    60    <IntegerDisplay {...moreThan1k} startAt="k" />
    61  );
    62  export const LevelKAndMoreThan10k = () => (
    63    <IntegerDisplay {...moreThan10k} startAt="k" />
    64  );
    65  export const LevelKAndMoreThan100k = () => (
    66    <IntegerDisplay {...moreThan100k} startAt="k" />
    67  );
    68  export const LevelKAndMoreThan1M = () => (
    69    <IntegerDisplay {...moreThan1M} startAt="k" />
    70  );
    71  export const LevelKAndMoreThan10M = () => (
    72    <IntegerDisplay {...moreThan10M} startAt="k" />
    73  );
    74  export const LevelKAndMoreThan1000M = () => (
    75    <IntegerDisplay {...moreThan1000M} startAt="k" />
    76  );
    77  export const LevelKAndNegativeNumber = () => (
    78    <IntegerDisplay {...negativeNumber} startAt="k" />
    79  );
    80  export const LevelKAndNumberAsString = () => (
    81    <IntegerDisplay {...numberString} startAt="k" />
    82  );
    83  export const LevelKAndNumberNull = () => (
    84    <IntegerDisplay {...numberNull} startAt="k" />
    85  );
    86  export const LevelKAndNumberUndefined = () => (
    87    <IntegerDisplay {...numberUndefined} startAt="k" />
    88  );
    89  
    90  export const Level100KAndLessThan1k = () => (
    91    <IntegerDisplay {...lessThan1k} startAt="100k" />
    92  );
    93  export const Level100KAndMoreThan1k = () => (
    94    <IntegerDisplay {...moreThan1k} startAt="100k" />
    95  );
    96  export const Level100KAndMoreThan10k = () => (
    97    <IntegerDisplay {...moreThan10k} startAt="100k" />
    98  );
    99  export const Level100KAndMoreThan100k = () => (
   100    <IntegerDisplay {...moreThan100k} startAt="100k" />
   101  );
   102  export const Level100KAndMoreThan1M = () => (
   103    <IntegerDisplay {...moreThan1M} startAt="100k" />
   104  );
   105  export const Level100KAndMoreThan10M = () => (
   106    <IntegerDisplay {...moreThan10M} startAt="100k" />
   107  );
   108  export const Level100KAndMoreThan1000M = () => (
   109    <IntegerDisplay {...moreThan1000M} startAt="100k" />
   110  );
   111  export const Level100KAndNegativeNumber = () => (
   112    <IntegerDisplay {...negativeNumber} startAt="100k" />
   113  );
   114  export const Level100KAndNumberAsString = () => (
   115    <IntegerDisplay {...numberString} startAt="100k" />
   116  );
   117  export const Level100KAndNumberNull = () => (
   118    <IntegerDisplay {...numberNull} startAt="100k" />
   119  );
   120  export const Level100KAndNumberUndefined = () => (
   121    <IntegerDisplay {...numberUndefined} startAt="100k" />
   122  );
   123  
   124  export const LevelMAndLessThan1k = () => (
   125    <IntegerDisplay {...lessThan1k} startAt="m" />
   126  );
   127  export const LevelMAndMoreThan1k = () => (
   128    <IntegerDisplay {...moreThan1k} startAt="m" />
   129  );
   130  export const LevelMAndMoreThan10k = () => (
   131    <IntegerDisplay {...moreThan10k} startAt="m" />
   132  );
   133  export const LevelMAndMoreThan100k = () => (
   134    <IntegerDisplay {...moreThan100k} startAt="m" />
   135  );
   136  export const LevelMAndMoreThan1M = () => (
   137    <IntegerDisplay {...moreThan1M} startAt="m" />
   138  );
   139  export const LevelMAndMoreThan10M = () => (
   140    <IntegerDisplay {...moreThan10M} startAt="m" />
   141  );
   142  export const LevelMAndMoreThan1000M = () => (
   143    <IntegerDisplay {...moreThan1000M} startAt="m" />
   144  );
   145  export const LevelMAndNegativeNumber = () => (
   146    <IntegerDisplay {...negativeNumber} startAt="m" />
   147  );
   148  export const LevelMAndNumberAsString = () => (
   149    <IntegerDisplay {...numberString} startAt="m" />
   150  );
   151  export const LevelMAndNumberNull = () => (
   152    <IntegerDisplay {...numberNull} startAt="m" />
   153  );
   154  export const LevelMAndNumberUndefined = () => (
   155    <IntegerDisplay {...numberUndefined} startAt="m" />
   156  );
   157  
   158  export const LevelInfinityAndLessThan1k = () => (
   159    <IntegerDisplay {...lessThan1k} startAt={false} />
   160  );
   161  export const LevelInfinityAndMoreThan1k = () => (
   162    <IntegerDisplay {...moreThan1k} startAt={false} />
   163  );
   164  export const LevelInfinityAndMoreThan10k = () => (
   165    <IntegerDisplay {...moreThan10k} startAt={false} />
   166  );
   167  export const LevelInfinityAndMoreThan100k = () => (
   168    <IntegerDisplay {...moreThan100k} startAt={false} />
   169  );
   170  export const LevelInfinityAndMoreThan1M = () => (
   171    <IntegerDisplay {...moreThan1M} startAt={false} />
   172  );
   173  export const LevelInfinityAndMoreThan10M = () => (
   174    <IntegerDisplay {...moreThan10M} startAt={false} />
   175  );
   176  export const LevelInfinityAndMoreThan1000M = () => (
   177    <IntegerDisplay {...moreThan1000M} startAt={false} />
   178  );
   179  export const LevelInfinityAndNegativeNumber = () => (
   180    <IntegerDisplay {...negativeNumber} startAt={false} />
   181  );
   182  export const LevelInfinityAndNumberAsString = () => (
   183    <IntegerDisplay {...numberString} startAt={false} />
   184  );
   185  export const LevelInfinityAndNumberNull = () => (
   186    <IntegerDisplay {...numberNull} startAt={false} />
   187  );
   188  export const LevelInfinityAndNumberUndefined = () => (
   189    <IntegerDisplay {...numberUndefined} startAt={false} />
   190  );