import React from 'react'; import { Button, ButtonWithDropdown, ButtonWithPopover, Checkbox, Icon, Modal, QTip, Select, Tabs, TextArea, TextField, ToolbarButton, Accordion, Alert, ButtonGroup, Carousel, Collapse, InputGroup, ProgressBar, SeeqActionDropdown, Slider, } from '@seeqdev/qomponents'; import ComplexSelectExample, { SelectOption } from './ComplexSelectExample'; const availableThemes = [ { display: 'Analysis', value: 'color_analysis' }, { display: 'Topic', value: 'color_topic' }, { display: 'DataLab', value: 'color_datalab' }, ]; const options = [ { value: '1', label: 'Beginner' }, { value: '2', label: 'Advanced' }, { value: '3', label: 'Expert' }, ]; const Trigger = ({ label }: { label: string }) => (
{label}
); const accordionItems = [ { value: 'phone', id: 'phone', itemTestId: 'phonecall', trigger: , content: (
If you need to reach us, please call us at 555-555-5555.
), }, { value: 'email', id: 'email', itemTestId: 'email', trigger: , content: (
If you need to reach us, please mail example@seeqtest.com
), }, { value: 'address', id: 'address', itemTestId: 'address', trigger: , content: (
If you need to reach us, please visit us at 1234 Main St., Anytown, USA.
), }, ]; const renderData = (text: string) => (

{text}

); const tabsList = [ { id: 'plugins', label: 'Plugins', icon: 'fc-data', content: renderData("Here's where you can find all the plugins you need. Enjoy!"), }, { id: 'addons', label: 'Addons', icon: 'fc-gears-2', content: renderData("Here's where you can find all the addons you need. Enjoy!"), }, { id: 'shelf', label: 'Shelf', icon: 'fc-workbook-lock', content: renderData("Here's where you can find all the private documents you need. Enjoy!"), }, ]; function Example() { /** * Theming is supported "out of the box". To apply a theme wrap your addOn in a div and assign the class that * matched the desired theme: * - color_analysis for Analysis styled qomponents (green) * - color_topic for Topic styled qomponents (blue) * - DataLab for DataLab styled qomponents (orange) */ const [theme, setTheme] = React.useState('color_analysis'); /** * qomponents also support tw-dark. To render qomponents using tw-dark wrap your addOn in a div and assign the * class "tw-dark" for dark-mode or "tw-light" for light mode. */ const [mode, setMode] = React.useState('tw-light'); const [btGroupType, setBtGroupType] = React.useState('left'); /** * This example uses controlled inputs (https://blog.logrocket.com/controlled-vs-uncontrolled-components-in-react/) */ const [textFieldValue, setTextFieldValue] = React.useState(''); const [textAreaValue, setTextAreaValue] = React.useState(''); const [selectValue, setSelectValue] = React.useState(); const [complexSelectedValue, setComplexSelectedValue] = React.useState(); const [alertDisplay, setAlertDisplay] = React.useState('success'); const [easeOfUse, setEaseOfUse] = React.useState(false); const [lookAndFeel, setLookAndFeel] = React.useState(false); const [speed, setSpeed] = React.useState(false); const [help, setHelp] = React.useState('phone'); const [openDropdown, setOpenDropdown] = React.useState(''); const [openPopver, setOpenPopover] = React.useState(''); const [modalOpen, setModalOpen] = React.useState(false); const [modalTitle, setModalTitle] = React.useState('Modal Title'); const [activeTab, setActiveTab] = React.useState('plugins'); const [collapseVisible, setCollapseVisible] = React.useState(false); const [inputGroupValue, setInputGroupValue] = React.useState(''); const [sliderValue, setSliderValue] = React.useState(50); return ( // outer-wrapper div that assigns the mode (tw-dark or light) as well as the theme
{/*add the QTip component at the very top level or your application to ensure your tooltips display as expected!*/}
qomponents - form example
Use this example to see qomponents in actions.
No libraries other than Seeq's qomponents (and of course React) are used to create this example, however minimal CSS is used to create an appealing form - you can find all that CSS in index.css.

A note on CSS: Seeq's qomponents come fully styled and ready to use. While it is tempting to use the available extraClassNames property to provide yet additional styling we strongly advise you to use this property to provide only width, margins and padding. This will ensure for a smooth upgrade experience when Seeq's look and feel changes.
Tip: to indicate missing or wrong user input use the showError property available on TextField, TextArea, as well as Select.

Using FontAwesome? You can pass FontAwesome Icons to the qomponent Icon component

Select theme:
{availableThemes.map((t) => ( setTheme(e.target.value)} extraClassNames="mr-10" /> ))}
AddOn Name
) => setTextFieldValue(e.target.value)} />
Description