2020-07-07 04:14:30 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as System from "~/components/system";
|
2020-06-22 14:00:51 +03:00
|
|
|
|
2020-07-16 08:48:51 +03:00
|
|
|
import Group from "~/components/system/Group";
|
2020-07-07 04:14:30 +03:00
|
|
|
import SystemPage from "~/components/system/SystemPage";
|
|
|
|
import ViewSourceLink from "~/components/system/ViewSourceLink";
|
2020-07-21 03:56:14 +03:00
|
|
|
import CodeBlock from "~/components/system/CodeBlock";
|
2020-06-22 14:00:51 +03:00
|
|
|
|
|
|
|
export default class SystemPageTooltips extends React.Component {
|
|
|
|
render() {
|
|
|
|
return (
|
2020-07-07 04:14:30 +03:00
|
|
|
<SystemPage
|
|
|
|
title="SDS: Tooltips"
|
|
|
|
description="..."
|
2020-07-21 02:48:10 +03:00
|
|
|
url="https://slate.host/system/tooltips"
|
2020-07-07 04:14:30 +03:00
|
|
|
>
|
2020-06-22 14:15:04 +03:00
|
|
|
<System.H1>
|
2020-07-01 10:31:55 +03:00
|
|
|
Tooltips <ViewSourceLink file="system/tooltips.js" />
|
2020-06-22 14:15:04 +03:00
|
|
|
</System.H1>
|
2020-06-22 14:00:51 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-01 10:31:55 +03:00
|
|
|
<System.P>
|
2020-07-07 04:14:30 +03:00
|
|
|
The Tooltip component is used to provide the user with more
|
|
|
|
information in a message that appears when they interact with an
|
|
|
|
element.
|
2020-07-01 10:31:55 +03:00
|
|
|
</System.P>
|
2020-06-22 14:00:51 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
|
|
|
<System.H2>Imports</System.H2>
|
|
|
|
<hr />
|
|
|
|
<br />
|
2020-07-07 04:14:30 +03:00
|
|
|
<System.P>Import React and the TooltipAnchor Component.</System.P>
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-21 03:56:14 +03:00
|
|
|
<CodeBlock>
|
2020-07-07 04:14:30 +03:00
|
|
|
{`import * as React from 'react';
|
2020-07-03 19:38:44 +03:00
|
|
|
import { TooltipAnchor } from 'slate-react-system';`}
|
2020-07-21 03:56:14 +03:00
|
|
|
</CodeBlock>
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-06-24 05:02:55 +03:00
|
|
|
<System.H2>Usage</System.H2>
|
|
|
|
<hr />
|
|
|
|
<br />
|
|
|
|
<System.P>Declare the Tooltip component.</System.P>
|
|
|
|
<br />
|
2020-07-21 03:56:14 +03:00
|
|
|
<CodeBlock>{`class ExampleOne extends React.Component {
|
2020-07-04 08:05:39 +03:00
|
|
|
render() {
|
|
|
|
return(
|
|
|
|
<TooltipAnchor tooltip="Hello friends!!" />
|
|
|
|
)
|
|
|
|
}
|
2020-07-21 03:56:14 +03:00
|
|
|
}`}</CodeBlock>
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<System.H2>Output</System.H2>
|
|
|
|
<hr />
|
|
|
|
<br />
|
2020-06-22 14:00:51 +03:00
|
|
|
<System.TooltipAnchor tooltip="Hello friends!!" />
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-03 19:38:44 +03:00
|
|
|
<System.H2>Accepted React Properties</System.H2>
|
2020-06-24 05:02:55 +03:00
|
|
|
<hr />
|
|
|
|
<br />
|
2020-07-01 10:31:55 +03:00
|
|
|
<Group title="Tooltip">
|
2020-06-24 05:02:55 +03:00
|
|
|
<System.Table
|
|
|
|
data={{
|
|
|
|
columns: [
|
2020-07-07 04:14:30 +03:00
|
|
|
{ key: "a", name: "Name", width: "128px" },
|
2020-07-14 07:28:18 +03:00
|
|
|
{ key: "b", name: "Type", width: "88px", type: "OBJECT_TYPE" },
|
2020-07-07 04:14:30 +03:00
|
|
|
{ key: "c", name: "Default", width: "88px" },
|
|
|
|
{ key: "d", name: "Description", width: "100%" },
|
2020-06-24 05:02:55 +03:00
|
|
|
],
|
|
|
|
rows: [
|
2020-07-07 04:14:30 +03:00
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
a: "tooltip",
|
2020-07-14 07:28:18 +03:00
|
|
|
b: "string",
|
2020-07-07 04:14:30 +03:00
|
|
|
c: "null",
|
|
|
|
d: "Output text on the tooltip",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
|
|
|
a: "height",
|
2020-07-14 07:28:18 +03:00
|
|
|
b: "number",
|
2020-07-07 04:14:30 +03:00
|
|
|
c: "24px",
|
|
|
|
d: "Height of the tooltip",
|
|
|
|
},
|
2020-06-24 05:02:55 +03:00
|
|
|
],
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Group>
|
2020-06-22 14:00:51 +03:00
|
|
|
</SystemPage>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|