當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript div.withConfig方法代碼示例

本文整理匯總了TypeScript中styled-components.div.withConfig方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript div.withConfig方法的具體用法?TypeScript div.withConfig怎麽用?TypeScript div.withConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在styled-components.div的用法示例。


在下文中一共展示了div.withConfig方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

import styled from 'styled-components';

export const Container = styled.div.withConfig({ componentId: 'main-tool-container' })`
  display: flex;
  flex-grow: 1;
  height: 100%;
  .ant-tabs {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  .ant-tabs-content {
    flex-grow: 1;
  }
  .ant-tabs-nav .ant-tabs-tab {
    padding: 10px 16px;
  }
  .ant-tabs-bar {
    margin-bottom: 0;
    height: 40px;
    min-height: 40px;
  }
`;

export const ScrollContainer = styled.div`
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
  width: 300px;
`;
開發者ID:notejs,項目名稱:gaea-editor,代碼行數:31,代碼來源:index.style.ts

示例2:

  }
`;

const ViewportContainerBoxAndPreviewContainer = css`
  display: flex;
  position: relative;
  flex-basis: 0%;
  flex-grow: 1;
  ${(props: any) =>
    props.theme.hidden &&
    `
        display: none;
    `};
`;

export const Container = styled.div.withConfig({ componentId: 'Container' })`
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
`;

export const LeftContainer = styled.div.withConfig({ componentId: 'LeftContainer' })`
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 0;
`;

export const RightContainer = styled.div.withConfig({ componentId: 'RightContainer' })`
  display: flex;
開發者ID:notejs,項目名稱:gaea-editor,代碼行數:31,代碼來源:page.style.ts

示例3:

import styled from 'styled-components';

export const Container = styled.div.withConfig({ componentId: 'tree-container' })`
  display: flex;
  flex-direction: column;
  width: 100%;
`;
開發者ID:notejs,項目名稱:gaea-editor,代碼行數:7,代碼來源:tree.style.ts

示例4: rotate

import styled from 'styled-components';

export const Container = styled.div.withConfig({ componentId: 'tree-node-container' })`
  flex-grow: 1;
`;

export const Title = styled.div`
  cursor: pointer;
  display: flex;
  user-select: none;
  font-size: 14px;
  color: #666;
  flex-grow: 1;
  align-items: center;
`;

export const TitleCaret = styled.div`
  width: 15px;
  height: 15px;
  margin-right: 5px;
  padding-left: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  fill: #666;
  transition: all 0.2s;
  ${(props: any) =>
    props.themes.down &&
    `
    transform: rotate(90deg);
  `};
開發者ID:notejs,項目名稱:gaea-editor,代碼行數:31,代碼來源:tree-node.style.ts

示例5:

import styled from 'styled-components';

const activeBorderColor = '#35b8d6';

export const Container = styled.div.withConfig({ componentId: 'plugin-tree-node-container' })`
  display: flex;
  background-color: #eee;
  color: #666;
  font-size: 14px;
`;

export const Content = styled.div.withConfig({ componentId: 'plugin-tree-node-content' })`
  display: flex;
  flex-grow: 1;
  align-items: center;
  height: 30px;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  transition: border-right-color 0.3s;
  border-right: 3px solid transparent;
  &:hover {
    border-right-color: ${activeBorderColor};
  }
  ${(props: any) =>
    props.theme.editted &&
    `
    border-right-color: ${activeBorderColor};
  `};
`;

export const Title = styled.div`
開發者ID:notejs,項目名稱:gaea-editor,代碼行數:31,代碼來源:tree-node.style.ts


注:本文中的styled-components.div.withConfig方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。