Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CianciarusoCataldo committed Jul 12, 2023
1 parent 6bee7ea commit e5d198b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
1 change: 1 addition & 0 deletions playground/src/engine.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const engineConfig = {
Slider: "/components/atoms/Slider",
Spinner: "/components/atoms/Spinner",
Table: "/components/molecules/Table",
TabPanel: "/components/organisms/TabPanel",
Toggle: "/components/atoms/Toggle",
},
},
Expand Down
37 changes: 37 additions & 0 deletions playground/src/pages/TabPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Button } from "mobrix-ui-preview";
import { BooleanProp, StringProp } from "@cianciarusocataldo/demo-ui";
import { ComponentPage } from "components/ComponentPage";
import { demoRows, demoProps } from "constants/demo-props";
import DemoComponent from "components/DemoComponent";

const TabPanelPage = () => (
<ComponentPage
name="TabPanel"
translations
render={(t, componentLabel) => {
const contentLabel = t("props_children");
const clickMessage = t("common_click");

return (
<DemoComponent
label={componentLabel}
startColor="#BFBABA"
props={{
children: StringProp(contentLabel),
disabled: BooleanProp(false),
...demoProps,
}}
rows={[["children", "disabled"], ...demoRows]}
parseProps={(props, setProps) => ({
...props,
onClick: () => alert(clickMessage),
})}
>
{Button}
</DemoComponent>
);
}}
/>
);

export default TabPanelPage;
2 changes: 1 addition & 1 deletion src/components/organisms/TabPanel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { buildMobrixUiStandardComponent } from "../../../utils";
*/
const TabPanel: TabPanelComponent = ({ tabs = [], ...commonProps }) => {
return buildMobrixUiStandardComponent({
name: "tabpanel",
name: "tab-panel",
commonProps,
});
};
Expand Down
4 changes: 4 additions & 0 deletions src/components/organisms/TabPanel/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#mobrix-ui-tab-panel {
display: flex;
flex-direction: row;
}

0 comments on commit e5d198b

Please sign in to comment.