Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
82e41b76
Unverified
Commit
82e41b76
authored
10 months ago
by
Phoomparin Mano
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Update embedding SDK readme to remove height CSS workaround (#42453)
* update readme as height is now optional * remove other wrapper
parent
b4ed5a3b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enterprise/frontend/src/embedding-sdk/README.md
+4
-10
4 additions, 10 deletions
enterprise/frontend/src/embedding-sdk/README.md
with
4 additions
and
10 deletions
enterprise/frontend/src/embedding-sdk/README.md
+
4
−
10
View file @
82e41b76
...
...
@@ -183,6 +183,8 @@ export default function App() {
After the SDK is configured, you can use embed your question using the
`StaticQuestion`
component.
You can optionally pass in
`height`
to change the height of the component.
```
jsx
import
React
from
"
react
"
;
import
{
MetabaseProvider
,
StaticQuestion
}
from
"
@metabase/embedding-sdk-react
"
;
...
...
@@ -194,11 +196,7 @@ export default function App() {
return
(
<
MetabaseProvider
config
=
{
config
}
>
{
/** You need to set the parent container to have some width and height, and display as flex,
because the Metabase visualizations have flex-grow: 1 and will take up all available space. */
}
<
div
style
=
{
{
width
:
800
,
height
:
600
,
display
:
"
flex
"
}
}
>
<
StaticQuestion
questionId
=
{
questionId
}
showVisualizationSelector
=
{
false
}
/>
</
div
>
</
MetabaseProvider
>
);
}
...
...
@@ -217,9 +215,7 @@ export default function App() {
return
(
<
MetabaseProvider
config
=
{
config
}
>
<
div
style
=
{
{
width
:
800
,
height
:
600
,
display
:
"
flex
"
}
}
>
<
InteractiveQuestion
questionId
=
{
questionId
}
/>
</
div
>
<
InteractiveQuestion
questionId
=
{
questionId
}
/>
</
MetabaseProvider
>
);
}
...
...
@@ -284,9 +280,7 @@ const questionId = 1; // This is the question ID you want to embed
return
(
<
MetabaseProvider
config
=
{
config
}
pluginsConfig
=
{
plugins
}
>
<
div
style
=
{
{
width
:
800
,
height
:
600
,
display
:
"
flex
"
}
}
>
<
InteractiveQuestion
questionId
=
{
questionId
}
/>
</
div
>
<
InteractiveQuestion
questionId
=
{
questionId
}
/>
</
MetabaseProvider
>
);
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment