@purr-react-styled-components/components.navbar 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_components.d.ts +4 -0
- package/dist/_style.d.ts +6 -0
- package/dist/_types.d.ts +10 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +34 -0
- package/package.json +41 -0
package/dist/_style.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Styled: {
|
|
2
|
+
Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
3
|
+
Title: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
4
|
+
LeftButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
5
|
+
RightButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
6
|
+
};
|
package/dist/_types.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { IExtendable } from '@purr-core/utils.definitions';
|
|
3
|
+
|
|
4
|
+
export interface INavbarProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
leftButton?: ReactNode;
|
|
7
|
+
rightButton?: ReactNode;
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
htmlAttributes?: HTMLAttributes<HTMLDivElement> & IExtendable;
|
|
10
|
+
}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("clsx"),t=require("styled-components"),i=()=>t.css(["display:flex;flex:1;justify-content:center;align-items:center;height:100%;"]),n={Container:t.nav.withConfig({displayName:"_style__Container",componentId:"sc-1iryjg8-0"})(["position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-around;align-items:center;height:56px;background-color:#121212;"]),Title:t.span.withConfig({displayName:"_style__Title",componentId:"sc-1iryjg8-1"})(["",";"],i),LeftButton:t.span.withConfig({displayName:"_style__LeftButton",componentId:"sc-1iryjg8-2"})(["",";"],i),RightButton:t.span.withConfig({displayName:"_style__RightButton",componentId:"sc-1iryjg8-3"})(["",";"],i)},u=({title:s,leftButton:a,rightButton:o,className:r,htmlAttributes:l})=>e.jsxs(n.Container,{...l,className:c("navbar",r),children:[e.jsx(n.LeftButton,{className:"navbar__button navbar__button--left",children:a}),e.jsx(n.Title,{className:"navbar__title",children:s}),e.jsx(n.RightButton,{className:"navbar__button navbar__button--right",children:o})]});exports.Navbar=u;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import _ from "clsx";
|
|
3
|
+
import t, { css as p } from "styled-components";
|
|
4
|
+
const i = () => p(["display:flex;flex:1;justify-content:center;align-items:center;height:100%;"]), n = {
|
|
5
|
+
Container: t.nav.withConfig({
|
|
6
|
+
displayName: "_style__Container",
|
|
7
|
+
componentId: "sc-1iryjg8-0"
|
|
8
|
+
})(["position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-around;align-items:center;height:56px;background-color:#121212;"]),
|
|
9
|
+
Title: t.span.withConfig({
|
|
10
|
+
displayName: "_style__Title",
|
|
11
|
+
componentId: "sc-1iryjg8-1"
|
|
12
|
+
})(["", ";"], i),
|
|
13
|
+
LeftButton: t.span.withConfig({
|
|
14
|
+
displayName: "_style__LeftButton",
|
|
15
|
+
componentId: "sc-1iryjg8-2"
|
|
16
|
+
})(["", ";"], i),
|
|
17
|
+
RightButton: t.span.withConfig({
|
|
18
|
+
displayName: "_style__RightButton",
|
|
19
|
+
componentId: "sc-1iryjg8-3"
|
|
20
|
+
})(["", ";"], i)
|
|
21
|
+
}, y = ({
|
|
22
|
+
title: o,
|
|
23
|
+
leftButton: a,
|
|
24
|
+
rightButton: s,
|
|
25
|
+
className: r,
|
|
26
|
+
htmlAttributes: l
|
|
27
|
+
}) => /* @__PURE__ */ c(n.Container, { ...l, className: _("navbar", r), children: [
|
|
28
|
+
/* @__PURE__ */ e(n.LeftButton, { className: "navbar__button navbar__button--left", children: a }),
|
|
29
|
+
/* @__PURE__ */ e(n.Title, { className: "navbar__title", children: o }),
|
|
30
|
+
/* @__PURE__ */ e(n.RightButton, { className: "navbar__button navbar__button--right", children: s })
|
|
31
|
+
] });
|
|
32
|
+
export {
|
|
33
|
+
y as Navbar
|
|
34
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@purr-react-styled-components/components.navbar",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"typescript": "*",
|
|
25
|
+
"react": "*",
|
|
26
|
+
"clsx": "*",
|
|
27
|
+
"@purr-core/utils.definitions": "0.0.4"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@purr-react-styled-components/components.button": "0.0.1"
|
|
31
|
+
},
|
|
32
|
+
"author": "@DinhThienPhuc",
|
|
33
|
+
"license": "ISC",
|
|
34
|
+
"description": "",
|
|
35
|
+
"sideEffects": false,
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "vite build --watch",
|
|
38
|
+
"build": "tsc && vite build",
|
|
39
|
+
"lint": "eslint . --ext ts,tsx --max-warnings 0"
|
|
40
|
+
}
|
|
41
|
+
}
|