Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/default-layout

Package Overview
Dependencies
Maintainers
33
Versions
1149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/default-layout

The default layout components for Sanity

  • 2.30.7-findability.87
  • findability
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.5K
decreased by-55.96%
Maintainers
33
Weekly downloads
 
Created
Source

default-layout

Sidecar

The Sidecar will be enabled in a Studio if there is an implementations of the part part:@sanity/default-layout/sidecar

part:@sanity/default-layout/sidecar

An implementation of part:@sanity/default-layout/sidecar must export these:

  • SidecarToggleButton React component. The button which will appear in the Navbar to toggle on/off the Sidecar
  • SidecarLayout React component. The content of the Sidecar (once it appears)
  • isSidecarEnabled Function. Call this to check if the Sidecar implementation is happy and good to go (typically, the sidecar impl. wants to verify if config is present)

If you need inspiration, the @sanity/studio-hints package is an implementation of this part.

part:@sanity/default-layout/sidecar-datastore

In addition, Sidecar relies on part:@sanity/default-layout/sidecar-datastore. This part already exists and shouldn't be overridden unless there's a good reason. This part exports:

  • isSidecarOpenSetting listen to this to get realtime updates on the sidecar open/close state
  • toggleSidecarOpenState call this to flip the sidecar open/close state

Keywords

FAQs

Package last updated on 20 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc