Skip to content
Snippets Groups Projects
Unverified Commit 0103ac33 authored by Mahatthana (Kelvin) Nomsawadi's avatar Mahatthana (Kelvin) Nomsawadi Committed by GitHub
Browse files

Misc embedding fixes and polishing (#23681)

* Fix embedding option name

* Adjust breadcrumb size to match previous page heading
parent 75e77f87
No related branches found
No related tags found
No related merge requests found
......@@ -357,7 +357,7 @@ const SECTIONS = updateSectionsWithPlugins({
},
{
key: "enable-embedding",
display_name: t`Enable Embedding Metabase in other Applications`,
display_name: t`Embedding`,
type: "boolean",
showActualValue: true,
getProps: setting => {
......@@ -393,6 +393,7 @@ const SECTIONS = updateSectionsWithPlugins({
widget: () => {
return (
<Breadcrumbs
size="large"
crumbs={[
[
t`Embedding`,
......@@ -443,6 +444,7 @@ const SECTIONS = updateSectionsWithPlugins({
widget: () => {
return (
<Breadcrumbs
size="large"
crumbs={[
[
t`Embedding`,
......
......@@ -20,6 +20,10 @@
cursor: default;
}
:local(.breadcrumb.fontLarge) {
font-size: 0.875rem;
}
:local(.breadcrumbDivider) {
margin-left: var(--breadcrumb-divider-spacing);
margin-right: var(--breadcrumb-divider-spacing);
......
......@@ -19,15 +19,17 @@ export default class Breadcrumbs extends Component {
crumbs: PropTypes.array,
inSidebar: PropTypes.bool,
placeholder: PropTypes.string,
size: PropTypes.oneOf(["medium", "large"]),
};
static defaultProps = {
crumbs: [],
inSidebar: false,
placeholder: null,
size: "medium",
};
render() {
const { className, crumbs, inSidebar, placeholder } = this.props;
const { className, crumbs, inSidebar, placeholder, size } = this.props;
const breadcrumbClass = inSidebar ? S.sidebarBreadcrumb : S.breadcrumb;
const breadcrumbsClass = inSidebar ? S.sidebarBreadcrumbs : S.breadcrumbs;
......@@ -51,6 +53,7 @@ export default class Breadcrumbs extends Component {
className={cx(
breadcrumbClass,
breadcrumb.length > 1 ? S.breadcrumbPath : S.breadcrumbPage,
{ [S.fontLarge]: size === "large" },
)}
>
{breadcrumb.length > 1 && typeof breadcrumb[1] === "string" ? (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment