2020-07-31 10:48:51 +02:00
|
|
|
|
/*
|
2024-09-24 09:42:07 +02:00
|
|
|
|
* Copyright (c) 2020 - present Cloudogu GmbH
|
2020-07-31 10:48:51 +02:00
|
|
|
|
*
|
2024-09-24 09:42:07 +02:00
|
|
|
|
* This program is free software: you can redistribute it and/or modify it under
|
|
|
|
|
|
* the terms of the GNU Affero General Public License as published by the Free
|
|
|
|
|
|
* Software Foundation, version 3.
|
2020-07-31 10:48:51 +02:00
|
|
|
|
*
|
2024-09-24 09:42:07 +02:00
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
|
|
|
|
* details.
|
2020-07-31 10:48:51 +02:00
|
|
|
|
*
|
2024-09-24 09:42:07 +02:00
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
2020-07-31 10:48:51 +02:00
|
|
|
|
*/
|
2024-09-24 09:42:07 +02:00
|
|
|
|
|
2020-07-31 10:48:51 +02:00
|
|
|
|
import * as React from "react";
|
|
|
|
|
|
import { storiesOf } from "@storybook/react";
|
|
|
|
|
|
import Help from "./Help";
|
|
|
|
|
|
|
|
|
|
|
|
const longContent =
|
|
|
|
|
|
"Cleverness nuclear genuine static irresponsibility invited President Zaphod\n" +
|
|
|
|
|
|
"Beeblebrox hyperspace ship. Another custard through computer-generated universe\n" +
|
|
|
|
|
|
"shapes field strong disaster parties Russell’s ancestors infinite colour\n" +
|
|
|
|
|
|
"imaginative generator sweep.";
|
|
|
|
|
|
|
|
|
|
|
|
storiesOf("Help", module)
|
2021-09-15 17:40:08 +02:00
|
|
|
|
.addDecorator((storyFn) => <div className="m-6">{storyFn()}</div>)
|
2020-07-31 10:48:51 +02:00
|
|
|
|
.add("Default", () => <Help message="This is a help message" />)
|
|
|
|
|
|
.add("Multiline", () => (
|
|
|
|
|
|
<>
|
2021-09-15 17:40:08 +02:00
|
|
|
|
<div className="mt-4">
|
2020-07-31 10:48:51 +02:00
|
|
|
|
<label>With multiline (default):</label>
|
|
|
|
|
|
<Help message={longContent} />
|
2021-09-15 17:40:08 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
<div className="mt-4">
|
2020-07-31 10:48:51 +02:00
|
|
|
|
<label>Without multiline:</label>
|
|
|
|
|
|
<Help message={longContent} multiline={false} />
|
2021-09-15 17:40:08 +02:00
|
|
|
|
</div>
|
2020-07-31 10:48:51 +02:00
|
|
|
|
</>
|
|
|
|
|
|
));
|