Skip to content

Commit

Permalink
feat(Grid): add classname prop
Browse files Browse the repository at this point in the history
  • Loading branch information
oreqizer authored and mainframev committed Oct 17, 2023
1 parent d668024 commit 036eb85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/orbit-components/src/utils/Grid/index.js.flow
Expand Up @@ -24,6 +24,7 @@ export type Props = {|
...BasicProps,
...Globals,
+as?: string,
+className?: string,
+mediumMobile?: MediaQuery,
+largeMobile?: MediaQuery,
+tablet?: MediaQuery,
Expand Down
3 changes: 2 additions & 1 deletion packages/orbit-components/src/utils/Grid/index.tsx
Expand Up @@ -17,6 +17,7 @@ const inlineClasses: Record<QUERIES, { inline: string; grid: string }> = {

const Grid = ({
children,
className,
as: ComponentTag = "div",
dataTest,
width,
Expand Down Expand Up @@ -92,7 +93,7 @@ const Grid = ({
// @ts-expect-error orbit string as
<ComponentTag
data-test={dataTest}
className={cx([
className={cx(className, [
inline ? "inline-grid" : "grid",
spaceAfter && spaceAfterClasses[spaceAfter],
vars["--grid-width"] != null && "w-[var(--grid-width)]",
Expand Down
1 change: 1 addition & 0 deletions packages/orbit-components/src/utils/Grid/types.d.ts
Expand Up @@ -18,6 +18,7 @@ export interface BasicProps extends Common.SpaceAfter {

export interface Props extends Common.Globals, Common.SpaceAfter, BasicProps {
readonly as?: string;
readonly className?: string;
readonly mediumMobile?: BasicProps;
readonly largeMobile?: BasicProps;
readonly tablet?: BasicProps;
Expand Down

0 comments on commit 036eb85

Please sign in to comment.