Skip to content

Commit

Permalink
feat: sync changes from v2 to v2-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra authored and github-actions[bot] committed Jan 8, 2025
1 parent cccbe01 commit 18906c7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
target: ['alpha', 'v2-develop']
steps:
- name: Call create sync pr
uses: gisce/create-sync-pr@v0.0.6
uses: gisce/create-sync-pr@v0.0.9
with:
repository: ${{ env.LIBRARY_NAME }}
targetBranch: ${{ matrix.target }}
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/react-ooui",
"version": "2.52.2",
"version": "2.53.0",
"engines": {
"node": "20.5.0"
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"@ant-design/plots": "^1.0.9",
"@gisce/fiber-diagram": "2.1.1",
"@gisce/ooui": "2.27.0",
"@gisce/react-formiga-components": "1.8.0",
"@gisce/react-formiga-components": "1.9.0",
"@gisce/react-formiga-table": "1.9.1",
"@monaco-editor/react": "^4.4.5",
"@tabler/icons-react": "^2.11.0",
Expand Down
33 changes: 30 additions & 3 deletions src/widgets/containers/Notebook.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
import React from "react";
import { Tabs } from "antd";
import { Tabs, theme } from "antd";
import styled from "styled-components";
import iconMapper from "@/helpers/iconMapper";

import { Notebook as NotebookOoui, Group as GroupOoui } from "@gisce/ooui";
import { Group } from "@/index";
const { TabPane } = Tabs;

const StyledTabs = styled(Tabs)<{ borderRadius?: string }>`
.ant-tabs-content-holder {
border-left: 1px solid rgba(228, 228, 231, var(--tw-border-opacity));
border-right: 1px solid rgba(228, 228, 231, var(--tw-border-opacity));
border-bottom: 1px solid rgba(228, 228, 231, var(--tw-border-opacity));
padding: 15px;
border-bottom-left-radius: ${(props) => props.borderRadius || "5px"};
border-bottom-right-radius: ${(props) => props.borderRadius || "5px"};
margin-top: -1px;
}
.ant-tabs > .ant-tabs-nav {
/* So that there is no gap between the content and tabs */
margin-bottom: 0;
}
.ant-tabs-nav {
margin-bottom: 0 !important;
}
`;

type Props = {
ooui: NotebookOoui;
responsiveBehaviour: boolean;
Expand All @@ -14,6 +36,7 @@ type Props = {
function Notebook(props: Props): React.ReactElement {
const { ooui, responsiveBehaviour } = props;
const tabs = ooui.pages;
const { token } = theme.useToken();

function getPageIcon(icon: string) {
if (icon) {
Expand All @@ -24,7 +47,11 @@ function Notebook(props: Props): React.ReactElement {
}

return (
<Tabs defaultActiveKey="1" tabPosition={ooui.tabPosition}>
<StyledTabs
defaultActiveKey="1"
tabPosition={ooui.tabPosition}
borderRadius={`${token.borderRadius}px`}
>
{tabs
.filter((page: any) => !page.invisible)
.map((page: any) => {
Expand All @@ -45,7 +72,7 @@ function Notebook(props: Props): React.ReactElement {
</TabPane>
);
})}
</Tabs>
</StyledTabs>
);
}

Expand Down

0 comments on commit 18906c7

Please sign in to comment.