Sha256: 9c936d284d647fff469fda028ab9a307a8cb1e556b33a1fe40c9a8429c7cb692

Contents?: true

Size: 1.03 KB

Versions: 51

Compression:

Stored size: 1.03 KB

Contents

/* eslint-disable react-hooks/rules-of-hooks */
import React, { useState } from 'react';
import { select, action } from '@theforeman/stories';

import { TASKS_DASHBOARD_AVAILABLE_TIMES } from '../../TasksDashboardConstants';
import TasksTimeRow from './TasksTimeRow';

export default {
  title: 'TasksDashboard/TasksTimeRow',
  component: TasksTimeRow,
};

export const withState = () => {
  const [time, updateTime] = useState(TASKS_DASHBOARD_AVAILABLE_TIMES.H24);

  return <TasksTimeRow time={time} updateTime={updateTime} />;
};

export const withKnobs = () => (
  <TasksTimeRow
    time={select(
      'time',
      TASKS_DASHBOARD_AVAILABLE_TIMES,
      TASKS_DASHBOARD_AVAILABLE_TIMES.H24
    )}
    updateTime={action('updateTime')}
  />
);

export const with24Hours = () => (
  <TasksTimeRow time={TASKS_DASHBOARD_AVAILABLE_TIMES.H24} />
);

export const with12Hours = () => (
  <TasksTimeRow time={TASKS_DASHBOARD_AVAILABLE_TIMES.H12} />
);

export const withWeek = () => (
  <TasksTimeRow time={TASKS_DASHBOARD_AVAILABLE_TIMES.WEEK} />
);

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
foreman-tasks-5.2.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-5.3.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-5.2.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-5.1.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-5.1.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.1.5 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.1.4 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.1.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-3.0.6 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-5.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.1.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.1.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.1.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-3.0.5 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-4.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-3.0.4 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-2.0.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-3.0.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js
foreman-tasks-3.0.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js